Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
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

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
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