Skip to content

Instantly share code, notes, and snippets.

@hayes
Last active August 29, 2015 14:07
Show Gist options
  • Save hayes/2ffa9cb36002078b83ed to your computer and use it in GitHub Desktop.
Save hayes/2ffa9cb36002078b83ed to your computer and use it in GitHub Desktop.
var express = require('express')
var app = express();
var sub = express.Router()
var sub2 = express.Router()
sub2.get('/c', function(req, res, next, base) {
res.send('sub test!!')
})
sub.use('/b/', sub2)
app.use('/a/', sub)
var server = app.listen(3000, function() {
console.log('Listening on port %d', server.address().port)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment