Skip to content
Myr

app.js

This file

Path

examples/mounting/app.js

24 lines · 553 bytes · JavaScript

Last changed by

Merge branch 'refactor/dev-deps'Tj Holowaychukbefore adoption7999386

History of this file

Take it

The walk stopped after 200 commits: lines older than fb38d9c point at it.

add test for res.send(undefined)Aaron Heckmannbefore adoptionfb38d9c

lines 1–24why, one step back
1
2/**3 * Module dependencies.4 */56var express = require('../../lib/express')7 , blog = require('../blog/app');89var app = express.createServer();1011app.use(express.cookieParser());12app.use(express.session({ secret: 'keyboard cat' }));1314// mount the blog. the blog app is written using the "base"15// local variable, allowing it's urls to adjust to wherever16// we wish to mount it.17app.use('/blog', blog);1819app.get('/', function(req, res){20 res.send('Visit <a href="/blog">/blog</a>');21});2223app.listen(3000);24console.log('Server listening on port 3000');