Have built the app with ubuntu, nginx so far… no firewall set up yet, etc. First time deploying a MERN stack, first time using DigitalOcean.
My console’s result when i run the droplet ip address for frontend, is Uncaught SyntaxError: Unexpected Token ‘>’.
Steps I’m taking to get app up and running:
First I’m running npm run build in the server, to compile tsx to js.
Then I’m running npm run build in the client.
I move the client’s build folder to the server’s build folder, renaming it static.
In the server folder, i run pm2 start build/index.js, so it’s pointing to build/static/index.html.
Both my css and js files are the html file.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.