oak-crud
v1.1.0
Published
CRUD API Generator
Downloads
4
Readme
OAK CRUD API Generator
Generates a CRUD API server, including MongoDB connection, models, routes, logger...
Installing:
npm install -g oak-crud
Usage:
oak -f model.json
cd my-api
npm install
npm run start
or use quick start
oak -q
model.json format
{
"appname" : "my-api",
"models" : [{
"name" : "books",
"methods" : ["get", "post", "patch", "put", "delete"],
"schema": [{
"name": "name",
"type": "String",
"required": true
},
{
"name": "createdDate",
"type": "Date",
"default": "Date.now()"
}]
}]
}