3.0.0 • Published 8 years ago

nxus-rest-api v3.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

nxus-rest-api

Build Status

Exposes Nxus Storage models as a REST API.

Installation

In your Nxus application:

> npm install @nxus/rest-api --save

Usage

Configuration

In package.json:

 "config": {
   "restapi": {
     "url_path": "/api"
    }
 }
 

Routes

GET /api/:model
POST /api/:model
GET /api/:model/:id
PUT /api/:model/:id
DELETE /api/:model/:id

API


RestAPI

Exposes a REST API for Nxus models e.g. GET /api/todo, POST /api/todo, GET /api/todo/1, etc

Examples

Configuration (defaults):
{restapi: {
  url_path: '/api'
}}