I've successfully received API data using my node server and now I want to display it on my webflow site. I can do this easily enough with a local index.html client but how to do it when it's a remote client hosted on webflow? What client side javacript do I need to add in the webflow code block to display the console logged data? Here is my node js code. Thanks for any help.
const Blockfrost = require('@blockfrost/blockfrost-js');
const API = new Blockfrost.BlockFrostAPI({
projectId: 'xxxxxxxxxxxxxxxxx',
});
const PAGE_SIZE = 100 /* 100 is the max Blockfrost page size */
const stake_address = 'stake1';
async function count_assets() {
let total = 0;
try {
let page = 1;
let assets = [];
// Retrieve assets as long as pages are full
do {
assets = await API.accountsAddressesAssets(
stake_address,
{ page: page, count: PAGE_SIZE, order: 'asc' }
);
total += assets.length;
page++;
} while (assets.length == PAGE_SIZE);
} catch (err) {
console.log('error', err);
}
return total;
}
count_assets(stake_address).then(assets => {
console.log(stake_address, 'assets:', assets);
});