app.js
This file
Path
examples/mounting/app.js
23 lines · 511 bytes · JavaScript
Last changed by
Merge branch 'mounting'Tj Holowaychukbefore adoptiona572a71
History of this fileTake it
Merge branch 'mounting'Tj Holowaychukbefore adoptiona572a71
lines 1–23why, one step back12// Expose modules in ./support for demo purposes3require.paths.unshift(__dirname + '/../../support');45/**6 * Module dependencies.7 */89var express = require('../../lib/express')10 , blog = require('../blog/app');1112var app = express.createServer();1314app.use(express.cookieParser());15app.use(express.session({ secret: 'keyboard cat' }));16app.use('/blog', blog);1718app.get('/', function(req, res){19 res.send('Visit <a href="/blog">/blog</a>');20});2122app.listen(3000);23console.log('Server listening on port 3000');