Backend Moralis API

Hi there, have created a project that contains of 2 folders: dex(front-end) and dexBack(back-end). On localhost, am running ā€œnode index.jsā€ command and on the front-end am getting Moralis API calls perfectly (wallet balances, dollar valuesā€¦). However, when I upload files to Github and then sync with Netlify to host on real server, am NOT GETTING any API callsā€¦

What might be the issue? before uploading to Github, I ran ā€œnpm run buildā€ in DEX(front-end) folder and connencted that Build production with Netlify. So looks like Back-end Moralis settings are being left out from Build folder, is it true? if yes, then what shall I do?

Any ideas what to do to recieve Moralis API calls on real server? Any hint?

Thanks in advance

1 Like

any specific error that you get when it doesnā€™t work?

Well, the API calls are not being fetched, as if on localhost if I dont run ā€œnode index.jsā€ and start my front-end I wonā€™t get any API calls, right? same here)

I have researched this topic a bit, seems like I have to create a ā€˜public folderā€™ in backend, then paste all files from front-end ā€˜buildā€™ folder there. Also need to add ā€˜start scriptā€™ in backend package-jason folder, like so: start: ā€˜node index.jsā€™ā€¦

seems as if there is sooo much more to it, rather then just running production build in front-end folder and uploading it to github-netlify. A lot is missing in the Moralis Youtube tutorial. ( not that I am complaining, but would be so nice if the lecturer does explain not just how to Create a React App with a Node Backend Moralis API but also how to upload that shit into real serverā€¦

1 Like

dude I have same problem, created another thread about it, it must be axios issue. check my thread and lets see if we can get any help here.