progs/ap0.js
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Wed, 16 Nov 2016 02:39:32 +0000
changeset 498 ba35def0965b
parent 166 bba0504abcf0
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
166
bba0504abcf0 added js snippets
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     1
var express = require('express');
bba0504abcf0 added js snippets
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     2
var app = express();
bba0504abcf0 added js snippets
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     3
bba0504abcf0 added js snippets
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     4
app.get('/', function(request, response){
bba0504abcf0 added js snippets
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     5
    response.write('Hello World');
bba0504abcf0 added js snippets
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     6
    response.end()
bba0504abcf0 added js snippets
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     7
});
bba0504abcf0 added js snippets
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     8
bba0504abcf0 added js snippets
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     9
// starting the server
bba0504abcf0 added js snippets
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    10
app.listen(8000);