I am building an MERN stack app cardano dex tool, I want to use Blockfrost.
I have installed the SDK in Node.js backend, but there are only very few examples on how to get any kind of data from it.
The Blockfrost documentation gives more info and I know how to use it with fetch, but only url based and don't know how to implement QUERY PARAMETERS into the url request. Here is an example.
function getAssets(){
fetch(`https://cardano-mainnet.blockfrost.io/api/v0/assets`,{
headers: {
"project_id":'API KEY'
},
})
.then(res=>res.json())
.then(data=>{console.log(data)})
}
getAssets()
If there is someone that could explain me a bit how to start using Blockfrost the proper way with a Node.js backend and basically get any kind of information.
Or maybe there is a better solution to get all data from the Cardano network, I have an relay node running with GraphQL, but getting data from that is very difficult if you just starting to use it and I don't know if it will keep working after the Alonzo fork.
Please someone that can help me pointing the right direction would be awesome.