This repository has been archived by the owner on Jun 19, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Request handlers now receive a state object
Controllers now pass the request state as an additional parameter to the route handlers. The state can be used to store temporary data, which the different route callbacks and handlers can use while handling the request: get('/records', function(req, res, params, state) { state.user = 'john'; req.next(); }, function(req, res, params, state) { res.end(state.user); });
- Loading branch information
1 parent
f3b0f7a
commit 30d3b42
Showing
3 changed files
with
82 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters