Class: Router

WF.Router

new Router()

Router Core router of FortressJS
Source:

Methods

(static) .addRoute()

Add a route
Source:
Example
wf.Router.addRoute("myhost", "GET", "/route/:id", callback);

(static) .ANY()

Full Route for GET POST PUT and DELETE
Source:
Example
wf.Router.DELETE("myhost", "/route/:id", callback);

(static) .DELETE()

DELETE Route
Source:
Example
wf.Router.DELETE("myhost", "/route/:id", callback);

(static) .GET()

GET Route
Source:
Example
wf.Router.GET("myhost", "/route/:id", callback);

(static) .match()

Match router for a request
Source:
Returns:
Array of routes
Example
wf.Router.match(req);

(static) .POST()

POST Route
Source:
Example
wf.Router.POST("myhost", "/route/:id", callback);

(static) .PUT()

PUT Route
Source:
Example
wf.Router.PUT("myhost", "/route/:id", callback);