comws
Expressive middleware for node.js using generators via co to make node applications more enjoyable to write. Comws middleware flow in a stack-like manner exactly like koa ones. Use of generators also greatly increases the readability and robustness of your application.
Installation
npm install comws --save
Comws is supported in all versions of node > 4.
Getting started
See all examples in example folder to get started.
Open an issue if you have any question or suggestion.
Example
const CoMws = ;const mws = ; mws; mws; const ctx = result: 'yet another'; mws;
Use multiple middlewares
Starting from version 2.1, you can also
use multiple middleware in the same use
call:
const CoMws = ;const mw1 mw2 = ; const mws = ; mws;
or also chain use
calls:
const CoMws = ;const mw1 mw2 = ; const mws = ; mws;
Running tests
$ npm install && npm test
License
The MIT License (MIT)
Copyright (c) 2016 parro-it