Automatic api generation from an SQL database, complete with http API endpoint scaffolding code and preconditions checking.
| 53a13c92e2 Swagger generator now filters according to passed verbs. 2 years ago | ||||
|---|---|---|---|---|
| lib | 53a13c92e2 | 2 years ago | ||
| vendor | 6d83cd1f4e | 2 years ago | ||
| .gitignore | db3adfef63 | 3 years ago | ||
| BUGS | 6fc12db5e6 | 3 years ago | ||
| LICENSE | 4d0a84e56a | 3 years ago | ||
| README.md | ae58d97545 | 3 years ago | ||
| TODO | b4aee6ce21 | 3 years ago | ||
| all.json | cdbaf2bf58 | 3 years ago | ||
| main.go | bc8849901c | 2 years ago | ||
README.md
Automatic api generation from an SQL database, complete with http API endpoint scaffolding code and preconditions checking.
go get github.com/gorilla/mux
# Get package
go get is-a-dev.com/autoapi
# See that it works (if your go env is setup properly)
autoapi --help
cd $GOPATH/src
mkdir autoapiapp && cd autoapiapp
autoapi -d="DB_NAME" -u="root" -h="localhost" -P="3306"
Once this step is complete your directory should now look like:
$GOPATH/src/whatever/
bin/
main.go (Main application binary, run this to start it)
db/
/mysql
/DB_TABLES (Database queries themselves for mysql)
dbi/
/DB_TABLES
http/
/DB_TABLES
From your project root:
go run bin/main.go -d="DB_NAME" -u="root" -h="localhost" -P="3306"
Your api will now be runnning on: http://localhost:8080 (by default)