Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/binocarlos/method-router
Return a filter function for http-requests for get,post,put,delete - works well with routes-router
https://github.com/binocarlos/method-router
Last synced: 11 days ago
JSON representation
Return a filter function for http-requests for get,post,put,delete - works well with routes-router
- Host: GitHub
- URL: https://github.com/binocarlos/method-router
- Owner: binocarlos
- License: mit
- Created: 2014-01-26T14:15:52.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-01-26T14:32:06.000Z (almost 11 years ago)
- Last Synced: 2024-10-14T03:07:44.499Z (about 1 month ago)
- Language: JavaScript
- Size: 137 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
method-router
=============Return a filter function for http-requests for get,post,put,delete - works well with routes-router
## usage
```
var methods = require('method-router');var get = methods.post(function(req, res, next){
// this will only happen for a get request
})var post = methods.post(function(req, res, next){
// this will only happen for a post request
})```
## installation
```
$ npm install method-router
```## license
MIT