2.0.1 • Published 5 years ago
beidou-router v2.0.1
Beidou Router
Auto Router for Beidou framework
Install
$ npm install beidou-router --save
Configuration
- config/plugin.js:
exports.router = {
enable: true,
package: 'beidou-router',
};
- config/config.default.js
/**
* Router options
* @member Config#router
*/
exports.router = {
/**
* root directory for auto match route
* include server route and webpack entry
* @member {String} Config#root
* @since 1.0.0
*/
root: '/',
/**
* files or directories should be ignored
* when automatically match route
* @member {String} Config#exclude
* @since 1.0.0
*/
exclude: '_*',
/**
* define custom mapping files to router
*
* {
* user: {
* profile: 'get',
* ':id': ['post', 'get'],
* }
* }
*
*/
mapping: null,
entry: 'index',
};
Usage
Straightly visit page located in client
directory.
e.g. with default config, access GET: /
will render client/index.jsx
file.
API
coming soon
License
2.0.1
5 years ago
2.0.0
5 years ago
2.0.0-beta.0
5 years ago
2.0.0-alpha.1
5 years ago
2.0.0-alpha.0
5 years ago
1.1.0
5 years ago
1.0.9
6 years ago
1.0.8
6 years ago
1.0.0
6 years ago
1.0.0-beta.3
6 years ago
1.0.0-beta.2
6 years ago
1.0.0-beta.1
6 years ago
1.0.0-beta.0
6 years ago
1.0.0-alpha.5
6 years ago
1.0.0-alpha.4
6 years ago
1.0.0-alpha.3
6 years ago
1.0.0-alpha.2
6 years ago
1.0.0-alpha.1
6 years ago
0.3.2
6 years ago