I
I
IvankoPo2017-06-01 01:29:59
Computer networks
IvankoPo, 2017-06-01 01:29:59

How do I give computers access to my web server on the local network?

I am a beginner, a question came up while learning node. The simplest code started the server, and it listened to port 8080, on my laptop, when accessing the browser at localhost: 8080, I displayed my Hello world, how can I make sure that other devices located on this local network can contact my server at the address?

var http = require("http");

http.createServer(function(request, response) {
  response.writeHead(200, {"Content-Type": "text/plain"});
  response.write("Hello World");
  response.end();
}).listen(8080);

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Gares Antonovich, 2017-06-01
@Rupaka

It is best to use open server, where you can share your site even on www by your ip without any problems

V
Vladimir Kivva, 2017-06-01
@zionkv

The problem is not in the network itself? Have you tried turning off the firewall?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question