app.js
This file
Path
examples/ejs/app.js
29 lines · 649 bytes · JavaScript
Last changed by
Merge branch 'view-index'Tj Holowaychukbefore adoptiona290134
History of this fileTake it
The walk stopped after 200 commits: lines older than f179979 point at it.
Regenerated guideTj Holowaychukbefore adoptionf179979
lines 1–18why, one step back12// Expose modules in ./support for demo purposes3require.paths.unshift(__dirname + '/../../support');45/**6 * Module dependencies.7 */89var express = require('./../../lib/express');1011var app = express.createServer();1213// Optional since express defaults to CWD/views1415app.set('views', __dirname + '/views');1617// Dummy users18var users = [fixed ejs example for new localsTj Holowaychukbefore adoption3968375
lines 19–21why, one step back19 { name: 'tj', email: 'tj@sencha.com' }20 , { name: 'ciaran', email: 'ciaranj@gmail.com' }21 , { name: 'aaron', email: 'aaron.heckmann+github@gmail.com' }Regenerated guideTj Holowaychukbefore adoptionf179979
lines 22–24why, one step back22];2324app.get('/', function(req, res){Merge branch 'view-index'Tj Holowaychukbefore adoptiona290134
line 25why, one step back25 res.render('users.ejs', { users: users });Regenerated guideTj Holowaychukbefore adoptionf179979
lines 26–28why, one step back26});2728app.listen(3000);fixed ejs example for new localsTj Holowaychukbefore adoption3968375
line 29why, one step back29console.log('Express app started on port 3000');