changeset 163 | 02026ee18378 |
child 383 | 3e1a2c8ed980 |
162:5031e7778fdb | 163:02026ee18378 |
---|---|
1 var express = require('express'); |
|
2 var app = express(); |
|
3 |
|
4 app.get('/', function(request, response){ |
|
5 response.write('Hello World'); |
|
6 response.end() |
|
7 }); |
|
8 |
|
9 // alternative response |
|
10 //response.write('<H1>Hello World</H1>'); |
|
11 |
|
12 // starting the server |
|
13 app.listen(8000); |
|
14 console.log("Server running at http://127.0.0.1:8000/"); |