node-moko

0.1.0 • Public • Published

Node-Moko

Node-Moko is used to generate configuration for moco, and it allows you to define RESTFul API(s) in seconds.

There is a related project for ruby here.

Installation
$ npm install node-moko -g

or

$ npm install node-moko

define resources in node-moco

resource should be defined in file moko.up, the content of this file is just a simple json:

{
    "user": {
        "id": "integer",
        "description": "string"
    },
    "listing": {
        "title": "string",
        "address": "string",
        "postcode": "integer"
    }
}

this configuration defined 2 resources: users and listings.

launch:

$ mokoup generate && mokoup server

if you installed node-moko locally, you should launch it by using:

$ ./node_modules/node-moko/bin/mokoup generate
$ ./node_modules/node-moko/bin/mokoup server

Readme

Keywords

Package Sidebar

Install

npm i node-moko

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • juntao