Welcome aboard! We are happy you are here and wish you good net-raft!
var http = require('http');
var fs = require('fs');
http.createServer(function (req, res) {
fs.readFile('Hello_world.txt', function(err, data) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write(data);
return res.end();
});
}).listen(8080);
// put into Hello_world.txt
Hello world!
Hello all!
The most helpful NODEJS solutions
get user ipNODEJS Click to see more ... 7.6K 1.7K