Skip to content
Myr

app.js

This file

Path

examples/mounting/app.js

23 lines · 551 bytes · JavaScript

Last changed by

its is possessive, it's is shorthand for: it isDave Hooverbefore adoption31262d2

History of this file

Take it

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

comma firstTj Holowaychukbefore adoption85df59a

lines 1–13why, one step back
1/**
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"

its is possessive, it's is shorthand for: it isDave Hooverbefore adoption31262d2

line 14why, one step back
14// local variable, allowing its urls to adjust to wherever

comma firstTj Holowaychukbefore adoption85df59a

lines 15–23why, one step back
15// 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');