gengojs-default-router

0.0.6 • Public • Published

gengojs-default-router

The default router plugin for gengo.js.

Build Status

An example usage with options is:

 
var gengo = require('gengojs');
var router = require('gengojs-default-router');
 
/* In whatever framework you are using: */
 
// I'll use express for an example
// but it shouldn't matter
 
var app = require('express')();
app.use(gengo({
   // Specify the type
   // of option to modify
    router:{
        /* options */
    }
},/*router()*/));

Options

{
    "enabled":false
}

Internal API

  • this.router.toArray()
    • Should return the URL path as an array.
  • this.router.toDot()
    • Should return the URL path as an dotted string.
  • this.router.isEnabled()
    • Should return true if router is enabled.

Dependencies

Not Applicable

Debug

Unix:

DEBUG=gengo.router

Windows:

SET DEBUG=gengo.router

See gengojs-debug for usage.

Contribute

Feel free to contribute or even fork the project. This plugin has been written in ES6 and can be seen under lib/index.js.

Readme

Keywords

none

Package Sidebar

Install

npm i gengojs-default-router

Weekly Downloads

5

Version

0.0.6

License

MIT

Last publish

Collaborators

  • iwatakeshi