var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(80, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');
तो, अगर मैं 1 9 2.168.1.100 को सुनना चाहता हूं, तो बस इसी तरह?नोडजेज़ का उपयोग कैसे करें एकाधिक ips सुनें?
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(80, '127.0.0.1').listen(80,'192.168.1.100');