node-host
node-host copied to clipboard
Cannot get node version
I was hoping there would be a way to get the node version via node --version, but that command is unavailable. So instead I figured I would log the version number off of the process variable, but this code fails to render (it just hangs up):
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write("Hello World from node v" + process.version + "\n");
res.end();
}).listen();
Ideally a tool look this would have a selectable node version and ability to use flags as well, but in the very least it would be good to know what version of node I am working with