Giter VIP home page Giter VIP logo

zd-flask-app's Introduction

Building an Flask App

Agenda

  1. Special Guest Workshop
  2. Break
  3. Flask live coding lecutre
  4. (if enough time) Breakout Rooms

Bootstrap Themes

Extra Credit: Deploying your app to Heroku.

Once you have a flask app running locally on your machine already, you can then try to make a live website that anyone can visit by depolying it to Heroku.

These instructions were adapted from this tutorial blog.

  1. Sign up for a free Heroku account at https://signup.heroku.com/signup/dc
  2. You should all already have git installed, so you can skip this step. Make sure you have git installed.
  3. For Mac Users: Install Homebrew if you dont have it already. (Window users can skip this step.)
  4. Install the Heroku CLI tool. Mac users need homebrew to install Heroku, Window users dont need it to install Heroku.

STEP 1: Create a github repo with your webapp files.

(You should already have this step completed, but if you dont, you need to add your files to a github repo.)

  1. Create a github repo for your app.
  2. Clone that repo to your local machine.
  3. Git add, commit, and push the webapp files to your repo. Now you should have a github repo that contains all the files you need for your web app, now we need to link, push, and deploy them onto heroku. Your github repo should look something like this.

STEP 2: Create and push files to Heroku.

  1. Make sure you have followed the instructions above for installing the Heroku CLI and git to your machine first.
  2. From your github repo folder, in your terminal, type in heroku login. Follow the login instructions.
  3. Next create your app using heroku create your-webapp-name. Replace 'your-webapp-name' with the app name you would like to use. It will be a part of your final URL.
  4. Then, add your git to heroku by using heroku git:remote -a your-webapp-name. Again, replace 'your-webapp-name' with the name you used above to create your app.
  5. Finally, push your files to heroku by using git push heroku HEAD:master After you push your files to heroku, it should spit out a link to your webapp, it will look something like, https://web-app-name.herokuapp.com/

Making changes to your app.

Say you've updated your webapp files now want to update your hosted webapp.

  1. Add, commit, and push all the changes to your github repo.
  2. Run the git push heroku HEAD:master command.

zd-flask-app's People

Contributors

zd123 avatar

Watchers

James Cloos avatar  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.