-
Notifications
You must be signed in to change notification settings - Fork 5
Home
vilicvane edited this page Dec 19, 2015
·
7 revisions
See https://github.com/vilic/vio-demos.
new Router(app, options);
-
app Express app, creating by
express()
. -
options? Router options.
- routesRoot? Root directory of your route files.
- viewsRoot? Root directory of view files.
-
viewsExtension? View file extension like
.hbs
or.tpl
. - errorViewsFolder? A folder containing custom error pages.
- defaultSubsite? Default subsite name. By specifying a default subsite, user can omit the name at the beginning of the path of URL.
- prefix? Path prefix of this router.
-
production? A boolean indicates whether this router should run under production mode. If omitted, it will be determined by whether
NODE_ENV
is set to"production"
.