Hi guys,
I’m following a tute on getting Cloud API to work with my dapp, wrote this cloud function based on the tute:
Moralis.Cloud.define("getNFTs", async (request) => {
let url = 'https://deep-index.moralis.io/api/v2/' + request.params.userAddr + '/nft/' + request.params.nftAddr
logger.info(url);
return Moralis.Cloud.httpRequest({
url: url,
params: {chain: "eth"},
headers: {
'accept': 'application/json',
'X-API-KEY': '#REDACTED#'
}
}).then( function(httpResponce){
return httpResponce.data;
}, function(httpResponse){
logger.info("error");
logger.info(httpResponse);
})
});
works great!
What I cant do is get it to work with my local Ganache instance? Is it even possible?
What I tried was setting the chain: “localdevchain” on a Ganache environment server instance connected with frpc.
Thanks guys!