author | Christian Urban <christian dot urban at kcl dot ac dot uk> |
Tue, 23 Sep 2014 02:04:34 +0100 | |
changeset 166 | bba0504abcf0 |
permissions | -rw-r--r-- |
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); |