Welcome aboard! We are happy you are here and wish you good net-raft!
// at first you must install "npm install linkifyjs"
//copy this code into app.js
var http = require('http');
var linkify = require('linkifyjs');
var linkifyHtml = require('linkifyjs/html');
var srv = http.createServer(function (req, res) {
var text = linkifyHtml('The site net-raft.com is for developers from all around the world.', {
defaultProtocol: 'https'
});
res.writeHead(200, {'Content-Type': 'text/html'});
res.end(text);
});
srv.listen(3000);
console.log("Listening to Port 3000");
// type "node app.js" in command prompt
// then put this url "http://localhost:3000/" into any browser
The most helpful NODEJS solutions
get user ipNODEJS Click to see more ... 7.6K 1.7K