app.js
This file
Path
examples/mounting/app.js
23 lines · 551 bytes · JavaScript
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than cd88b92 point at it.
Removed `app.dynamicLocals()`. Closes #756Tj Holowaychukbefore adoptioncd88b92
lines 1–23why, one step back1/**2 * Module dependencies.3 */45var express = require('../../lib/express')6 , blog = require('../blog/app');78var app = express.createServer();910app.use(express.cookieParser());11app.use(express.session({ secret: 'keyboard cat' }));1213// mount the blog. the blog app is written using the "base"14// local variable, allowing its urls to adjust to wherever15// we wish to mount it.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');