Skip to content
Myr

more docs

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 0733d3c · Browse files · 1 file+29 added−0 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+29 added−0 removed

  • other:+29 added−0 removed

1 file+29 added−0 removed

modified:docs/guide.md+29 added
1203 unmodified lines
1204 1205 app.lookup.get('/user');1206 app.get('/user');12071208 Each function returned has the following properties:1209 1210 var fn = app.get('/user/:id/:op?')[0];12111212 fn.regexp1213 // => /^\/user\/(?:([^\/]+?))(?:\/([^\/]+?))?\/?$/i12141215 fn.keys1216 // => ['id', 'op']12171218 fn.path1219 // => '/user/:id/:op?'12201221 fn.method1222 // => 'GET'12231224### app.match12251226 The _app.match_ http methods return an array of callback functions1227 which match the given _url_, which may include a query string etc. This
21 unmodified lines
12491250 app.match.all('/user/20');1251 // => [Function, Function, Function]12521253 Each function matched has the following properties:1254 1255 var fn = app.match.get('/user/23/edit')[0];12561257 fn.keys1258 // => ['id', 'op']12591260 fn.params1261 // => { id: '23', op: 'edit' }12621263 fn.method1264 // => 'GET'12651266### app.mounted(fn)12671268Assign a callback _fn_ which is called when this _Server_ is passed to _Server#use()_.1269
65 unmodified lines