Skip to content Skip to sidebar Skip to footer

Node.js Url Without Port Number

I'm creating node.js project now. I've a VPS which ubuntu 16.04 as op system and nginx as http server installed on it. As you know we use URL with port number like http://localhost

Solution 1:


Solution 2:

The only reason we use those kinds of port numbers for local development is because ports under 1024 are "reserved" and require root permissions to be used. You can still use port 80 for local development if you set your node server to listen on this port.

If you do make these changes to your node server, in order to run it locally you will need to run it as root or using sudo.


Post a Comment for "Node.js Url Without Port Number"