app.js
This file
Path
examples/mounting/app.js
23 lines · 551 bytes · JavaScript
Last changed by
Merge branch 'master' of github.com:visionmedia/expressTj Holowaychukbefore adoptionf519f0a
History of this fileTake it
The walk stopped after 200 commits: lines older than 99b49d2 point at it.
updated docsTj Holowaychukbefore adoption99b49d2
lines 1–13why, 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"Merge branch 'master' of github.com:visionmedia/expressTj Holowaychukbefore adoptionf519f0a
line 14why, one step back14// local variable, allowing its urls to adjust to whereverupdated docsTj Holowaychukbefore adoption99b49d2
lines 15–23why, one step back15// 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');