Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

10 Commits

Repository files navigation

http-dispatch

Pass this function the result of a http routing lookup (of the format { value, args, query }) and have the value be a function, then it will call that function in a manner of fn(...args, query, req).

Examples

http.createServer(function(request,response){constmatch=route(request);// -> { value: { fn }, args, query }if(!match)return;// probably send 404constresult=dispatch(match,request);// probably send the result as a response}).listen(8000);

About

Call a route function

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages