@nxus/rest-api

2.4.0-1 • Public • Published

@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'
}}

Dependencies (1)

Dev Dependencies (7)

Package Sidebar

Install

npm i @nxus/rest-api

Weekly Downloads

0

Version

2.4.0-1

License

MIT

Last publish

Collaborators

  • loppear
  • mjreich
  • nxus-admin