How to deploy dex correctly

hi i have followed the dex tutorial and it worked i even deployed to netlify however, after deploying the dex stopped working and i think its because in dexBack i still use 3001 as the port and use const res = await axios.get(http://localhost:3001/tokenPrice in swap.js.

How could i deploy the dex correctly so my front end can listen to my API call after website got deployed live at netilify.


Hey @alexisrileywhere did you deploy the dexBack? You will need to change it from localhost to a live backend url instead.

hi i managed to deploy the backend using it stated it deployed successfully and started calling API but did not give me a port so kept the 3001 port in index.js and changed to my server at swap.js and put… the swap i deployed works in general however if i go to it stats their is an error Cannot GET / any advice thanks alex :slight_smile:

You can check render docs on how are you supposed to deploy in that case, i don’t think you are supposed to use a port at all so make sure you check with them

thank you so much i will. alexis :slight_smile: