Skip to content
Myr

app.js

This file

Path

examples/ejs/app.js

32 lines · 648 bytes · JavaScript

Last changed by

Exposing ./support libs to examplesTj Holowaychukbefore adoption9b7470d

History of this file

Take it

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

Misc refactoring of github exampleTj Holowaychukbefore adoption4ee5c59

line 1why, one step back
1

Exposing ./support libs to examplesTj Holowaychukbefore adoption9b7470d

lines 2–4why, one step back
2// Expose modules in ./support for demo purposes
3require.paths.unshift(__dirname + '/../../support');4

Misc refactoring of github exampleTj Holowaychukbefore adoption4ee5c59

lines 5–32why, one step back
5/**
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 = [19 { name: 'tj', email: 'tj@sencha.com' },20 { name: 'ciaran', email: 'ciaranj@gmail.com' },21 { name: 'aaron', email: 'aaron.heckmann+github@gmail.com' }22];2324app.get('/', function(req, res){25 res.render('users.ejs', {26 locals: {27 users: users28 }29 });30});3132app.listen(3000);