node package manager
Don’t reinvent the wheel. Reuse code within your team. Create a free org »

onion.http

Onion HTTP

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

Installation

npm install onion.http

Usage

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