Giter Club home page Giter Club logo

autoapi's Introduction

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

autoapi's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

hudangwei

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.