nxus-rest-api

3.0.0 • 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'
}}

Readme

Keywords

Package Sidebar

Install

npm i nxus-rest-api

Weekly Downloads

0

Version

3.0.0

License

MIT

Last publish

Collaborators

  • mjreich