Giter Club home page Giter Club logo

aviato's Introduction

Build Status

use with heroku is easiest

easy button

Deploy

after the deploy is complete click "view app"

heroku use example

the name you choose for your app is needed in the urls below. i chose "aviatotest" as you can see. also I have taken the liberty of leaving aviatotest running so it can be played with

curl -s -H "Content-Type: application/json" -X POST -d '{"name":"dogs"}' https://aviatotest.herokuapp.com/groups
curl -s -H "Content-Type: application/json" -X POST -d '{"name":"cats"}' https://aviatotest.herokuapp.com/groups
curl -s -H "Content-Type: application/json" -X POST -d '{"first_name":"john","last_name":"schwinghammer","userid":"jschwing","groups":["dogs"]}' https://aviatotest.herokuapp.com/users
curl -s -H "Content-Type: application/json" -X PUT -d '{"first_name":"john","last_name":"schwinghammer","userid":"jschwing","groups":["dogs","cats"]}' https://aviatotest.herokuapp.com/users/jschwing
curl -s -H "Content-Type: application/json" -X PUT -d '{"name":"cats","users":[]}' https://aviatotest.herokuapp.com/groups/cats
curl -s https://aviatotest.herokuapp.com/users/jschwing

deploying manually

install

git clone https://github.com/tr3buchet/aviato.git

run tests

python tests.py flake8 .

run the server

multiple database types are supported as can be seen in the examples below

# set this to your database url
export DATABASE_URL='mysql://user:[email protected]:3306'
export DATABASE_URL='postgres://xbcutzpdwbjwxy:tBxOrqyV2v7Ae5Vm6EbcpHFNza@ec2-50-17-253-74.compute-1.amazonaws.com:5432/d92vf2nsn9r8vp'
export DATABASE_URL='sqlite:///:memory:'
export PORT='5000'
python app.py

local use examples

curl -s -H "Content-Type: application/json" -X POST -d '{"name":"dogs"}' localhost:5000/groups
curl -s -H "Content-Type: application/json" -X POST -d '{"name":"cats"}' localhost:5000/groups
curl -s -H "Content-Type: application/json" -X POST -d '{"first_name":"john","last_name":"schwinghammer","userid":"jschwing","groups":["dogs"]}' localhost:5000/users
curl -s -H "Content-Type: application/json" -X PUT -d '{"first_name":"john","last_name":"schwinghammer","userid":"jschwing","groups":["dogs","cats"]}' localhost:5000/users/jschwing
curl -s -H "Content-Type: application/json" -X PUT -d '{"name":"cats","users":[]}' localhost:5000/groups/cats
curl -s localhost:5000/users/jschwing

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.