-
Notifications
You must be signed in to change notification settings - Fork 3
/
app.js
39 lines (31 loc) · 919 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
var connect = require('connect')
, http = require('http');
var cookieParser = require('cookie-parser')
var app = connect();
app.use(cookieParser());
app.use(function (req, res, next) {
res.end(JSON.stringify(req.cookies));
});
// .use(connect.favicon())
// .use(connect.logger('dev'))
// .use(connect.static('public'))
// .use(connect.directory('public'))
// .use(connect.cookieParser())
// .use(connect.session({ secret: 'my secret here' }))
// .use(function (req, res, next) {
// console.log(req.url);
// next();
// })
// .use(function (req, res, next) {
// console.log(req.url);
// next();
// })
// .use(function (req, res, next) {
// console.log(req.url);
// next();
// })
// .use(function(req, res){
// res.end('Hello from Connect!\n');
// });
// console.log('hello world');
http.createServer(app).listen(3000);