Skip to content
vilicvane edited this page Dec 19, 2015 · 7 revisions

VIO Wiki

Overall Usages

See https://github.com/vilic/vio-demos.

API References

Classes

Router

new Router(app, options);

Parameters

  • 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".
Clone this wiki locally