Logo Lanfrica

Community-Dev-Angola/api-grandma

Domain:

digital infrastructure

Record type:

software
Creator:
Com
Host:
Framework to automatize API development # API GRANDMA - Faster API creation and database configuration API Grandma is an CLI Framework based API and ORM builder, made to automate API development and database modeling. Supports costum route creation, code generation, automated scripts and much more. Currently in alpha development, check the section #roadmap for more details. ## Overview Note:This is an detailed explanation of the program. For quick setup skip to last session There are 3 main options for API-GRAN to use, server, generate and database . ### Server The server mode generate an full server within just two files, the first contains the database configuration, and the second all the tables you might want to include (not required at all). For the server you just need to configure an file, call it any name you want, but .gra is cool to :) . Base configuration file: server={ "ip" : IP, "port" : PORT, "orm" : DATABASE_ORM, "database" : DATABASE }; Where: Option Explanation Example IP Your machine ip 127.0.0.1 PORT Database port 3306 ORM ORM to use sequelize DATABASE Database name to use my_database Example, config.txt contains the following: server={ "ip" : "127.0.0.1", "port" : 3306, "orm" : "sequelize", "database" : "my_database" }; There are more options fo include in the config file,and can be added as it follows, separed by ; (example): option1={ "value1" : "foo", "value2" : "bar", }; option2={ "value1" : "foo", "value2" : "bar", }; option3={ "value1" : "foo", "value2" : "bar", }; The second file contains all the database you want to include for the API, also the routes. The basic structure looks like: table_name={ FIELD1 : TYPE, FIELD2 : TYPE, FIELD3 : TYPE, }; Multiple tables can be included tho: table1={ FIELD1 : TYPE, FIELD2 : TYPE, FIELD3 : TYPE, }; table2={ FIELD1 : TYPE, FIELD2 : TYPE, FIELD3 : TYPE, }; table3={ FIELD1 : TYPE, FIELD2 : TYPE, FIELD3 : TYPE, }; Since you're building an API, you might want to specify the routes where those …

Licenses