1.3.5 • Published 3 years ago

think-router v1.3.5

Weekly downloads
408
License
-
Repository
github
Last release
3 years ago

think-router

Build Status Coverage Status npm

Router for ThinkJS 3.x

Install

npm install think-router

How to use

config file src/config/middleware.js

const router = require('think-router');
module.exports = [
  {handle: router, options: {}}
];

support options:

{
  defaultModule: 'home', //default module name, is enable in multi module mode
  defaultController: 'index', //default controller name
  defaultAction: 'index', //default action name
  prefix: [], // url prefix
  suffix: ['.html'], // url suffix
  enableDefaultRouter: true,
  optimizeHomepageRouter: true, 
  subdomainOffset: 2,
  subdomain: {}, //subdomain
  denyModules: [] //deny module, enable in multi module mode
}

Router config

config file src/config/router.js

module.exports = [
  ['/index', '/list']
]
1.3.5

3 years ago

1.3.4

5 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago