https://github.com/thinkjs/think-router-rest
Let think-router recognize REST router easily without custom router.
https://github.com/thinkjs/think-router-rest
rest router
Last synced: 7 months ago
JSON representation
Let think-router recognize REST router easily without custom router.
- Host: GitHub
- URL: https://github.com/thinkjs/think-router-rest
- Owner: thinkjs
- License: mit
- Created: 2017-09-23T05:58:45.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-08-12T12:01:00.000Z (almost 6 years ago)
- Last Synced: 2025-03-16T04:34:22.729Z (about 1 year ago)
- Topics: rest, router
- Language: JavaScript
- Size: 6.84 KB
- Stars: 1
- Watchers: 12
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# think-router-rest
[]()
[]()
[]()
[]()
Let think-router recognize REST router easily without custom router for ThinkJS 3.x.
## Installation
```sh
npm install think-router-rest --save
```
## How To Use
append this middleware in `src/config/middleware.js`:
```js
const router = require('think-router');
const routerREST = require('think-router-rest');
module.exports = [
{handle: router, options: {}},
{handle: routerREST, options: {}}
];
```
## Contributing
Contributions welcome!
## License
[MIT](https://github.com/thinkjs/think-router-rest/blob/master/LICENSE)