Hi! I followed the instructions here, https://www.digitalocean.com/community/articles/how-to-install-node-js-with-nvm-node-version-manager-on-a-vps, and I got a Node app up and running on port 3000. When I direct requests to that port, I see my app, but not when I send a request without specifying a port.
I tried running
$ PORT=80 node app, and Node threw an error and quit. It worked when I used PORT=8080 though.
On IRC, @kamal_ suggested I install and configure NGINX to to serve the static files “and pass everything else to Node.js”, and now I have NGINX up and running. When I go to my droplet’s IP now, I see “Welcome to nginx!” instead of having the connection refused, but I still have to append :3000 to the URL to see my Node app.
What are the next steps to making the app load on requests to the default port?
Thanks in advance!
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.