Skip to content

Latest commit

 

History

History
73 lines (52 loc) · 1.4 KB

README.md

File metadata and controls

73 lines (52 loc) · 1.4 KB

carpools

Running

  1. Check out the code

    git clone [email protected]:iandees/carpools.git
    
  2. Go in to the checked out repository

    cd carpools
    
  3. Set up a virtual environment

    virtualenv venv
    source venv/bin/activate
    
  4. Install the database. The app requires PostgreSQL and PostGIS. This guide describes how to get PostgreSQL running on your computer.

    When you have PostgreSQL installed, you need to create a database for the data to go. Use the psql command to connect to your PostgreSQL instance:

    $ psql
    psql (9.6.1, server 9.5.4)
    Type "help" for help.
    
    iandees=#
    

    Create the database and add the PostGIS extension:

    iandees=# create database carpools;
    CREATE DATABASE
    iandees=# \connect carpools
    psql (9.6.1, server 9.5.4)
    You are now connected to database "carpools" as user "iandees".
    carpools=# create extension postgis;
    CREATE EXTENSION
    carpools=# \quit
    
  5. Install the Python dependencies.

    pip install -r requirements.txt
    
  6. Set up the Flask framework configuration

    export FLASK_APP=wsgi.py
    export FLASK_DEBUG=1
    
  7. Set up the database

    flask db upgrade
    
  8. Run the Flask application

    flask run
    
  9. Browse to http://127.0.0.1:5000/ in your browser to check it out.