create-data-api-app

Quick start tutorial

(No installation required)

All we need is to create config.yaml.

Step 1: describe your server and database

name: My API app
port: 8080
path: /api
database: mysql

Step 2: add models and objects

name: My API app
port: 8080
path: /api
models:
  - users:
    - table users:

Step 3: add paths and fields

name: My API app
port: 8080
path: /api
models:
  - users:
    - table users:
        get:
          - int id
          - varchar name
          - varchar email
        get /users/:id:
          - int id PK
          - varchar name
          - varchar email
        post:
          - varchar name
          - varchar email

Step 3: generate code and run the app

npx create-data-api-app

node server.js

That's it!

Download config.yaml.