Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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