robertmeta / autoapi forked from is-a-dev.com/autoapi

Automatic api generation from an SQL database, complete with http API endpoint scaffolding code and preconditions checking.

Robert Melton:   c4fc084c96 Just made main a little more friendly with flags 2 years ago
lib d9806cb482 Fixed capitalization of output json, fixed bugs in bool 2 years ago
.gitignore 4d0a84e56a Init commit 2 years ago
BUGS 6fc12db5e6 Fixed a few bugs. 2 years ago
LICENSE 4d0a84e56a Init commit 2 years ago
README.md 774cb239ec Bit of work on #9, bit of work on #8. Should release this on Monday. 2 years ago
TODO b4aee6ce21 First working prototype for a simple table. 2 years ago
all.json cdbaf2bf58 Basic json-ld mapping 2 years ago
main.go c4fc084c96 Just made main a little more friendly with flags 2 years ago

README.md

autoapi

Automatic api generation from an SQL database, complete with http API endpoint scaffolding code and preconditions checking.

Installation

Prerequisites

Procedure

go get is-a-dev.com/autoapi

Usage

autoapi <dbhost> <dbname> <dbuser>

dbhost:            ip or hostname
dbname:            your db name
dbuser:            database user that has access to read the information schema.

A tiny guide:

cd in a new go project (empty dir under $GOPATH/src/wherever) autoapi if everything went according to plan, your dir now looks like this:

$GOPATH/src/whatever/
├──bin/
│  └──main.go
├──http/
│  └──several folders and/or depending on your db tables
├──dbi/
│  └──several folders and/or depending on your db tables
└──db/
   └──mysql/
      └──several folders and/or depending on your db tables.

You can just do 'go run bin/main.go ' and you should have a shiny REST api boot up on port 8080!