mlsgen

2.0.6 • Public • Published

mls-gen

code generator

npm version build

dependency devDep

available templates

quick start

create a yaml file in your project

## schema.yaml

name: "mysql-sample"
version: 1.0.0
template: 'https://github.com/mls2020/generator-mysql-ts.git'
plugins:
  - mysql
tables:
  book: 
    columns:
      id: autoincrement primary number notnull
      title: notnull string
procedures:
  get_book_by_id: 
    parameters:
      id: int notnull
    columns:
      id: autoincrement primary number notnull
      title: notnull string

in this example we are using the [https://github.com/mls2020/generator-pasv9] template which will create a typescript application (web api, rest client and redux client) that will map its api to a mysql database that have:

  • a book table
  • a user table
  • a get_book_by_id stored procedure

code generation

## Install globally mls-gen
npm i -g mlsgen

## Generate code
mlsgen -s ./schema.yaml -o output 

Readme

Keywords

none

Package Sidebar

Install

npm i mlsgen

Weekly Downloads

4

Version

2.0.6

License

ISC

Unpacked Size

14.9 kB

Total Files

7

Last publish

Collaborators

  • smulas