onion.http

Connect compatible HTTP middleware stack based on onion

Onion HTTP

Onion HTTP is a connect compatible HTTP middleware stack based on onion.

npm install onion.http

The API is very similar to other HTTP middleware stacks:

Onion   = require 'onion'
http    = require 'onion.http'
router  = require 'copperhead'
connect = require 'connect'
 
app = new Onion
app.construct http
 
app.use connect.logger 'dev'
app.use router
 
router.get ->
    "Hello World!"
 
app.listen 3000