Created
February 3, 2016 15:43
-
-
Save adam-hert/cb1793e1111a4cf3bcbd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tv = require('traceview'); | |
tv.traceMode = 'always'; | |
var express = require('express'); | |
var app = express(); | |
var cb0 = function (req, res, next){ | |
console.log('cb0'); | |
next(); | |
} | |
var cb1 = function (req, res, next){ | |
console.log('CB1'); | |
next(); | |
} | |
var cb2 = function (req, res){ | |
console.log('CB2'); | |
res.send('Hello from C!'); | |
} | |
app.get('/example/c', [cb0, cb1, cb2]); | |
app.get('/', function(req, res){ | |
res.send('Hello World!'); | |
}); | |
app.listen(80,function(){ | |
console.log('Example app listening port 80..'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment