0.1.0 • Published 12 years ago
node-moko v0.1.0
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 -gor
$ npm install node-mokodefine 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 serverif you installed node-moko locally, you should launch it by using:
$ ./node_modules/node-moko/bin/mokoup generate
$ ./node_modules/node-moko/bin/mokoup server0.1.0
12 years ago