progs/App0.js
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Sat, 27 Dec 2014 04:10:36 +0000
changeset 360 eb2004430215
parent 163 02026ee18378
child 383 3e1a2c8ed980
permissions -rw-r--r--
updated

var express = require('express');
var app = express();

app.get('/', function(request, response){
    response.write('Hello World');
    response.end()
});

// alternative response
//response.write('<H1>Hello World</H1>');

// starting the server
app.listen(8000);
console.log("Server running at http://127.0.0.1:8000/");