Welcome aboard! We are happy you are here and wish you good net-raft!
var http = require('http');
var srv = http.createServer(function (req, res) {
function GenUnique(length) {
var text = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for(var i = 0; i < length; i++) {
text += possible.charAt(Math.floor(Math.random() * possible.length));
}
return text;
}
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end(GenUnique(16));
});
srv.listen(3000);
console.log("Listening to Port 3000");
The most helpful NODEJS solutions