Giter Club home page Giter Club logo

flaskbars's Introduction

Getting Started with Python, Flask, SQLAlchemy, JSON, JQuery, and Heroku

Run Locally

  1. Setup virtualenv

  2. Setup PostgreSQL

    Set the DATABASE_URL environment variable to point to your PostgreSQL server:

     export DATABASE_URL=postgres://foo:foo@localhost/helloheroku
    

    Create the database schema:

     python manage.py createDbSchema
    
  3. Start Flask Server

     python web.py
    
  4. Test out the app

    http://localhost:5000

Run on Heroku

  1. Create the app

     heroku create -s cedar
    
  2. Add the Heroku Shared Database Add-on

     heroku addons:add shared-database
    
  3. Deploy the app

     git push heroku master
    
  4. Create the database schema

     heroku run "python manage.py createDbSchema"
    
  5. Open the app in your browser

     heroku open
    
  6. Verify that it works

  7. Switch the app to PROD mode

     heroku config:add PROD=True
    

flaskbars's People

Contributors

jamesward avatar

Watchers

David Gilman avatar Dan Koch avatar James Cloos avatar Mike Barkas avatar

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.