Giter Club home page Giter Club logo

flaskblockchain's Introduction

SETUP

Local setup

  • Clone github repository into a newly created folder: $ git clone https://github.com/emunsing/flaskblockchain.git
  • Create virtual environment by running $ virtualenv env
  • Set environment variables by running $ source .env
  • Install required Python packages with `$ pip install -r requirements.txt
  • Associate heroku repository by running$ git remote add heroku [email protected]:flaskblockchain.git
  • Run a local server with $ python flaskblockchain.py
  • Go to http://localhost:5000 and see results!

What the files do:

Needed for Flask app:

  • flaskblockchain.py: Needs to run the app, and provide handlers for http requests
  • Config.py: Defines environment variables for different execution environments, to turn on and off different functionalities or logging levels. Not strictly required, but useful for having both development and deployment environments
  • .env: Source this to set environment variables
  • requiremens.txt: Generated by pip freeze > requirements.txt

Required for Heroku:

  • runtime.txt: Specify the Python runtime environment
  • Procfile: Required by Heroku to indicate the type of dyno to spin up, and what to run

Notes:

When creating a new app...

  • In addition to installing Flask and other requirements, be sure to install

Setting up Heroku (one-time; should be done)

This assumes that you're using the command line:

  • Create app with $ heroku create myawesomeapp where your actual app name replaces myawesomeapp
  • Set environment with $ heroku config:set APP_SETTINGS=config.HerokuConfig
  • Set buildpack with $heroku buildpacks:set heroku/python
  • Set dyno scale with $ heroku ps:scale web=1

flaskblockchain's People

Stargazers

 avatar

Watchers

 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.