Socket
Book a DemoInstallSign in
Socket

restfuljs

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

restfuljs

Easy restful responses for APIs and ajax calls

0.0.4
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

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)

FAQs

Package last updated on 02 Sep 2012

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.