GithubHelp home page GithubHelp logo

pvarin / herokuflask Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 151 KB

The skeleton for a Flask app that is designed to run on Heroku. This skeleton employs the MVC architecture and serves only test content.

License: BSD 3-Clause "New" or "Revised" License

Python 69.43% Shell 30.57%

herokuflask's Introduction

HerokuFlask

The skeleton for a Flask app that is designed to run on Heroku. This skeleton employs the MVC architecture and serves only test content.

Dependencies

  • Python 2.7 (suggested version)
  • Virtualenv:
sudo pip install virtualenv

First Time Use

The setup script included is intended to run on Ubuntu. To change permissions and execute the script run:

chmod +x setup.sh
source setup.sh

Repeated Use

This package uses a Python virtualenv to manage dependencies. This means that each time you want to run your app locally you must first load the virtualenv. To do this simply run the command:

source venv/bin/activate

Deploying to Heroku

Once you are ready to deploy your app to Heroku for the first time, you must first create a Heroku account. To create a Heroku account visit the Heroku quickstart guide. Once you have an account and you have installed the Heroku client you can create your app from the command line using the command:

heroku create <your-app-name>

From then on you can push your changes to the Heroku server with the command

git push heroku master

For more information regarding Python and Heroku you can visit the Getting Started guide.

Python virtualenv

This skeleton takes advantage of a Python virtualenv, which is generally a good idea as it helps manage dependencies and prevents your application from breaking as you update dependencies. The downside of using the virtualenv is that, to ensure you are using the right dependencies, you must load the virtualenv each time you open a new terminal. This command is:

source venv/bin/activate

As your app grows it will probably take on more dependencies. As you do this, you must update your requirements.txt file, so that Heroku will also use the appropriate dependencies. To do this you must load the virtualenv and type the command:

pip freeze -l > requirements.txt

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.