Documentation ¶
Overview ¶
The routes package enables specifying dynamic http routes.
var api = require('routes'); api.get("/", function(path, args) { console.log(path, args); }); api.any("/:one", function(path, args) { console.log(path, args); }); api.any("/:one/:two", function(path, args) { console.log(path, args); }); api.get("/help/:article", function(path, args) { console.log(path, args); }); api.run();
Index ¶
- func New(orb *orbit.Orbit) interface{}
- type Module
- func (this *Module) Any(path string, call otto.Value)
- func (this *Module) Connect(path string, call otto.Value)
- func (this *Module) Delete(path string, call otto.Value)
- func (this *Module) Get(path string, call otto.Value)
- func (this *Module) Options(path string, call otto.Value)
- func (this *Module) Patch(path string, call otto.Value)
- func (this *Module) Post(path string, call otto.Value)
- func (this *Module) Put(path string, call otto.Value)
- func (this *Module) Run()
- func (this *Module) Trace(path string, call otto.Value)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.