Fixing up examples a bit
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 9b7470d · Browse files · 5 files·+21 added−8 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
5 files+21 added−8 removed
- other:+21 added−8 removed
Provenance
- Commit
ebdf643- Tree
9a5d5af- Author
Tj Holowaychuk <tj@vision-media.ca>- Committer
Tj Holowaychuk <tj@vision-media.ca>- Parent
9b7470d
5 files changed+21 added−8 removed
modified:examples/jade/app.js+5 added-1 removed
1234567833 unmodified lines42434445434647
// Expose modules in ./support for demo purposesrequire.paths.unshift(__dirname + '/../../support');
/** * Module dependencies. */
33 unmodified lines } });});
app.listen(3000);No newline at end of fileapp.listen(3000);console.log('Express app started on port 3000');No newline at end of filemodified:examples/multipart/app.js+7 added-3 removed
12345678679101112131432 unmodified lines47484950485152
// Expose modules in ./support for demo purposesrequire.paths.unshift(__dirname + '/../../support');
/** * Module dependencies. */
var express = require('./../../lib/express'), form = require('./../../support/connect-form'),var express = require('../../lib/express'), form = require('connect-form'), sys = require('sys');
var app = express.createServer( // connect-form (http://github.com/visionmedia/connect-form)32 unmodified lines sys.print('Uploading: %' + percent + '\r'); });});
app.listen(3000);No newline at end of fileapp.listen(3000);console.log('Express app started on port 3000');No newline at end of filemodified:examples/mvc/app.js+1 added-1 removed
8 unmodified lines910111213138 unmodified lines
require('./mvc').boot(app);
app.listen(3000);console.log('Application server started on port 3000');No newline at end of fileconsole.log('Express app started on port 3000');No newline at end of filemodified:examples/pages/app.js+5 added-1 removed
1 2+// Expose modules in ./support for demo purposes3+require.paths.unshift(__dirname + '/../../support');4+5 /**6 * Module dependencies.7 */8 82 unmodified lines91 app.get('/500', function(req, res, next){92 next(new Error('keyboard cat!'));93 });94 92-app.listen(3000);95+app.listen(3000);96+console.log('Express app started on port 3000');modified:examples/resource/app.js+3 added-2 removed
45 unmodified lines4647484950505152535415 unmodified lines7071727374747545 unmodified lines delete users[id]; res.send(destroyed ? 'destroyed' : 'Cannot find user'); }, range: function(req, res, a, b){ res.send(users.slice(a, b)); res.send(users.slice(a, b+1)); }};
// curl http://localhost:3000/users -- responds with all users15 unmodified lines '</ul>', ].join('\n')); });
app.listen(3000);No newline at end of fileapp.listen(3000);console.log('Express app started on port 3000');No newline at end of file