Answer the question
In order to leave comments, you need to log in
How to run a website on PC?
There is a site on nodejs.
I can’t figure out how to make it so that when I run it on my PC, someone from the Internet can access the site using my ip.
What is needed for this?
Run the server on a specific url (127.0.0.1) and the site will be visible?
Tell me please. I tried to find an answer to the question, but I found a lot of redundant information, which only confused
Answer the question
In order to leave comments, you need to log in
Allow access to the port (80th will not necessarily be used) in the firewall (+ on the router if behind NAT). URL: http://your-ip:port/
Nothing different from the server.
And for access from the outside - you need to have a real "white" external IP address on your computer.
Otherwise, forward.
But if the provider does not give a real "white" external address to your apartment at all, then nothing.
Да, запускайте на IP, но не на 127.0.0.1, а на "внешнем" - "глобальном" (это тот, с которого вы заходите на "глобальные" сайты как клиент), понадобится настроить роутер, брандмауэр, и еще учтите, что IP-адрес обычно динамический, он будет периодически меняться, так что переходите на статический у провайдера, либо придется периодически перезапускать сервер, и сообщать клиентам новый IP-адрес.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question