Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
restful npm module for express apps
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
lib
.gitignore
Readme.md
index.js
package.json

Readme.md

Restfuljs

Build App

npm install restfuljs -g

restfuljs --help

restfuljs app --help

restfuljs app -d myTestApi -w 'users, projects'

Add resource to existing app

restfuljs add profiles

Bootstrap data

You can easily bootstrap data into the application by running node app --bootstrap from the application directory. This will clear the database and load data from a json file in the data directory for each of the resources.

Response

quick and easy restful responses for expressjs apps

Installation

npm install restfuljs

Quick Start

add to express app middleware:

app.use(require('restfuljs').response);

Example uses

as direct callback to mongoose query:

models.user.findById(id, res.tful);

another mongoose query callback example:

user.save(res.tful);

manual call:

res.tful(error, result)

Something went wrong with that request. Please try again.