Some One
Some One

Reputation: 1

How can I host a node.js website on the my local network?

I have created a web app with node.js but i want to test it on my phone and other devices.

Something like prepros works for static sites as you put in your ip address on any device on the same wifi network and it will display the page.

How wold i set up my node app so it works on the network not just on localhost?

Upvotes: 0

Views: 922

Answers (1)

user4466350
user4466350

Reputation:

You need to use the ip 0.0.0.0 instead of 127.0.0.1, it will make the server listens all interface.

You may need to use sudo to listen that IP.

Upvotes: 1

Related Questions