Skip to content

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

License

Notifications You must be signed in to change notification settings

otremblay/autoapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AUTOAPI

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


Prerequisites

go get github.com/gorilla/mux

Installation

# Get package
go get is-a-dev.com/autoapi

# See that it works (if your go env is setup properly)
autoapi --help

Create a new API

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

Starting the API

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)

Additional Configuration

  • How to change the port and host
  • Other amazing features
# TODO Configurable all the things

Working with your new project

# TODO need to write more guidelines and tips for how to use this for awesome things
  • It is a good idea to use the routes generated as the base for your project, and include them in new packages instead of modifying them directly.

Project Roadmap

  • Finish constriant issues
  • Complete Swagger
  • Complete JSON-LD
  • Onwards to glory
# TODO Need to add some more items here, not sure on priority

Contributing

# TODO Need to write some guidelines you want for contributing to this project

Contributors

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages