0.1.3 • Published 12 years ago

handler v0.1.3

Weekly downloads
376
License
-
Repository
-
Last release
12 years ago

Handler

Handler is a tiny node module that all it does is monkey-patches Express, allowing you to write unRESTful route objects Handler is written in coffeescript by Marcel Miranda.

Source Code

Installation

npm install handler

Usage

# First require handler
require 'handler'

# Create express app
app = express.createServer()

# Then user handler
app.handler 'admin',
  dashboard: (req, res) -> ...
  user:
    get: (req, res) -> ...
    post: (req, res) -> ...

  # Which would be equivalent to
  app.get 'admin/dashboard', (req, res) -> ...
  app.get 'admin/user', (req, res) -> ...
  app.post 'admin/user', (req, res) -> ...

Copyright © 2012 Marcel Miranda. See LICENSE for further details.

0.1.3

12 years ago

0.1.2

12 years ago

0.1.1

12 years ago