Node.js Playground

Hello World

Copy the following code into the editor

var http = require('http');
var requestListener = function (req, res) {
  res.end('Hello, World!');

var server = http.createServer(requestListener);
server.listen(3000, function() { console.log("Listening on port 3000")});

Launch with node app.js

Visit the server via the URL http://[[CLIENT_SUBDOMAIN]]-3000-[[KATACODA_HOST]]

Interested in writing your own Node.js scenarios and demos? Visit