Skip to content

Setting up Local Environment

rdixit3 edited this page Mar 7, 2017 · 1 revision

Introduction

This wiki page explains how to set up the local environment on TerpDAC's pythonanywhere account

Instructions

Setting up the Basics

  1. Install Python 3.5+.
  2. Install Github.
  3. Use Github to download latest code.

Setting up your Environment

  1. Open a console and change into your SensorWebsite directory.
  2. Run the following command: pip install -r requirements.txt
  3. Create instance folder in MicSenseWeb.
  4. Enter the instance folder and create file config.py.
  5. Edit the config.py file with the following
# This should NEVER be uploaded to version control
# DBTYPE+PYDBENGINE://USERNAME:PASSWORD@SERVER_HOSTNAME/DATABASE_NAME
SQLALCHEMY_DATABASE_URI = "mysql+pymysql://USERNAME:PASSWORD@DATABASE_SERVER/DATABASE_NAME"

Create Account on db4free.net

  1. Create account on www.db4free.net.
  2. Get database credentials from website.
  3. Insert credentials into config.py.
  4. Run run_micsense.py
  5. If doesn't work, double check credentials.

Clone this wiki locally