Skip to content
Myr

removed some old invalid docs

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

new stuff to come

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 9d498ba · Browse files · 1 file+0 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

1 file+0 added−8 removed

  • other:+0 added−8 removed

1 file+0 added−8 removed

modified:docs/guide.md-8 removed
478 unmodified lines
479 app.get('/user/:userId', function(req, res){480 res.send('user ' + req.user.name);481 });482483For simple cases such as route placeholder validation and coercion we can simple pass a callback which has an arity of 1 (accepts one argument). Any errors thrown will be passed to _next(err)_.484485 app.param('number', function(n){ return parseInt(n, 10); });486487We may also apply the same callback to several placeholders, for example a route GET _/commits/:from-:to_ are both numbers, so we may define them as an array:488489 app.param(['from', 'to'], function(n){ return parseInt(n, 10); });490483### View Rendering484485View filenames take the form "<name>.<engine>", where <engine> is the name486of the module that will be required. For example the view _layout.ejs_ will
876 unmodified lines