Skip to content
Myr

Exposing ./support libs to examples

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 9f3ab86 · Browse files · 7 files+24 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

7 files+24 added−5 removed

  • other:+24 added−5 removed

7 files+24 added−5 removed

modified:examples/auth/app.js+3 added
modified:examples/blog/app.js+3 added
modified:examples/ejs/app.js+3 added
modified:examples/flash/app.js+5 added-1 removed
12// Expose modules in ./support for demo purposes3require.paths.unshift(__dirname + '/../../support');45/**6 * Module dependencies.7 */8
64 unmodified lines
73 req.flash('error', 'delivery failed');74 res.render('index');75});7674app.listen(3000);77app.listen(3000);78console.log('Express app started on port 3000');
modified:examples/form/app.js+2 added-1 removed
73 unmodified lines
74 req.flash('info', 'Updated ' + req.body.name);75 res.redirect('/?name=' + req.body.name);76});7778app.listen(3000);78app.listen(3000);79console.log('Express app started on port 3000');
modified:examples/format/app.js+2 added-1 removed
57 unmodified lines
58// Middleware5960app.use(express.errorHandler({ showStack: true }));6162app.listen(3000);62app.listen(3000);63console.log('Express app started on port 3000');
modified:examples/github/app.js+6 added-2 removed
12// Expose modules in ./support for demo purposes3require.paths.unshift(__dirname + '/../../support');45/**6 * Module dependencies.7 */8
77 unmodified lines
86 users = [];87 (function fetchData(name){88 // We have a user name89 if (name) {87 console.log('... fetching %s', name);90 console.log('... fetching \x1b[33m%s\x1b[0m', name);91 request('/repos/show/' + name, function(err, user){92 if (err) {93 next(err)94 } else {
19 unmodified lines
114// Serve statics from ./public115app.use(express.staticProvider(__dirname + '/public'));116117// Listen on port 3000115app.listen(3000);118app.listen(3000);119console.log('Express app started on port 3000');