How do I get my server to run forever publicly?

Posted May 31, 2015 7.3k views

I have a node app and I can run it on localhost as [IP ADDRESS]:3000, but how do I get it to run forever just as [IP ADDRESS]? A little confused on how this works

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.

Submit an Answer
4 answers

Browsers default to port 80 for HTTP and 443 for HTTPS, changing your server’s port (whether it’s Node.js or something else) to port 80 should do the trick.

You can use apache, nginx, haproxy, or the like and reverse proxy from [IP ADDRESS] -> [INTERNAL IP]:3000 (With Internal IP being locally - You can also change the port of your app to make it use 80 so when someone enters the IP (or domain if its an A record) it will go to the web page of your app without having to define the port within the URL

by Mitchell Anicas
Node.js is an open source Javascript runtime environment for easily building server-side and networking applications. The platform runs on Linux, OS X, FreeBSD, and Windows, and its applications are written in JavaScript. Node.js applications can be run at the command line but we will...

Great, thanks for the recommendation and help!