Skip to content
This repository has been archived by the owner on Apr 28, 2020. It is now read-only.

Running the Application locally

Anand Venkatanarayanan edited this page Aug 22, 2018 · 1 revision

Prerequisite

Mac OS Setup

Git Access via SSH

GitHub SSH Setup

Application Setup

  1. Clone dependent repositories.
$ mkdir code; cd code
$ git clone [email protected]:hasgeek/coaster.git
$ git clone [email protected]:hasgeek/baseframe.git
$ git clone [email protected]:hasgeek/lastuser.git
  1. Create Virtual Environment for Last User python app and activate it
 $ virtualenv ~/python/virt-env/hasgeek  
 $ source ~/python/virt-env/hasgeek/bin/activate
  1. The local dependencies in lastuser needs to be removed for running the application in development environment.
  $ brew install gnu-sed --with-default-names  # Installs GNU Sed and replaces the MacOS sed
  $ cd code/lastuser
  $ sed -i 's/git+https/# &/' requirements.txt 
  1. Install all dependencies of baseframe and coaster
 $ cd ~/Code/baseframe; python setup.py develop
 $ cd ~/Code/coaster;   python setup.py develop
 $ cd ~/Code/lastuser;  pip install -r requirements.txt
  1. Create Database user in PG-SQL.
$ createdb lastuser
  1. Customize settings for running it locally
$ cd ~/Code/lastuser
$ sed 's,localhost/lastuser,lastuser,g' instance/settings-sample.py > instance/development.py 
  1. Create Database models for lastuser.
$ python manage.py createdb
  1. Add entries in /etc/hosts
$ sudo sed -i -e "\$a \\\n# Last User hostname\\n127.0.0.1   lastuser.local" /etc/hosts
  1. Run the lastuser app in localhost
FLASK_ENV=development ./runserver.py
Clone this wiki locally