progs/ap0.js
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Tue, 21 Oct 2014 02:35:06 +0100
changeset 252 fa151c0a3cf4
parent 166 bba0504abcf0
permissions -rw-r--r--
updated slides
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);