Skip to content

Instantly share code, notes, and snippets.

@adam-hert
Created February 3, 2016 15:43
Show Gist options
  • Save adam-hert/cb1793e1111a4cf3bcbd to your computer and use it in GitHub Desktop.
Save adam-hert/cb1793e1111a4cf3bcbd to your computer and use it in GitHub Desktop.
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