Question

Express won't serve Client on Droplet

Hello, I’m at my wits end so here we go.

I created a working MERN stack app on DO a couple months ago (APP1), it works fantastically. I decided to use that app as a code base for another MERN app (APP2). Nearly nothing has changed from APP1 to APP2. The only changes have been to strings for the sake of renaming. APP2 works wonderfully in development environments, but won’t even present me with a “Cannot GET” message when I deploy it to a droplet. The droplet is reachable via ping, so I know it’s active. I get no errors during deployment. I don’t have the client setup to use a proxy. I do not have any dependency differences between APP1 and APP2. The only thing I have to go on is the error message in my browsers: “This site can’t be reached. xxx.xxx.xxx.xxx Refused to connect”.

I’m happy to provide any additional information or run suggested tests. Thank you for your time.


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Accepted Answer

Turns out it was a user permissions issue. Just had to run pm2 as “sudo pm2 start server.js”

Thanks to all who were pondering.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.