oak-crud

1.1.0 • Public • Published

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()"
        }]
    }]
}

Readme

Keywords

Package Sidebar

Install

npm i oak-crud

Weekly Downloads

1

Version

1.1.0

License

ISC

Unpacked Size

33.8 kB

Total Files

16

Last publish

Collaborators

  • jexulie