Created a simple server on NodeJS. How to hang it on the desired url, and not on the port?
In order for
mysite.loc in your
mysite.loc to have your server (do you want other people in LAN to go to this address?), You need to deal not with node.js, but raise your local server in LAN, which, on request,
mysite.loc will give out your IP address on the local network. Then any server running on your site will be available at the same address (with the appropriate firewall settings).
UPD0. In case you have several
node.js instances and each must respond to its hostname, put nginx in front of the nodes.
The question is, in fact, for RutCode .
- You mean, make an appointment by host , like in
- If so,