You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

chill

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chill

easy rest mapping for express

0.0.1
latest
npmnpm
Version published
Weekly downloads
5
66.67%
Maintainers
1
Weekly downloads
 
Created
Source

chill

easy rest mapping for express

###Install npm install chill

###Usage

app.js

    var chill = require("chill")(express);

    chill.handle(require("./routes/posts"));
    chill.handle(require("./routes/comments"));

posts.js / comments.js

 	exports.path = "/posts"; // ("/comments")

 	exports.create = function(req, res) {
 		//handle post
 	}

 	exports.list = function(req, res) {
 		//handle get w/ no id
 	}

	exports.findById = function(req, res) {
		//handle get w/ req.params.id
	}

 	exports.delete = function(req, res) {
		//handle delete w/ req.params.id
 	}

 	exports.update = function(req, res) {
		//handle put w/ req.params.id
 	}

FAQs

Package last updated on 11 Apr 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts