I've been looking online and have found that the stuff about SSJS is a bit confusing. How do I get started with Server-Side JavaScript? Can it be used with any web host?
So far, I've downloaded the Node.js program from the official website, installed it, setup PATH (which the installer does) and I've copied/pasted the code snippet:
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');
that is displayed on the main page into example.js, then opened the node cmd and entered: "node.js example.js" (without quotes) and all I get in return is:
...
But I should be getting:
"Hello, world!"
Am I doing something wrong?