This repository has been archived by the owner on Apr 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Running the Application locally
Anand Venkatanarayanan edited this page Aug 22, 2018
·
1 revision
- 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
- Create Virtual Environment for Last User python app and activate it
$ virtualenv ~/python/virt-env/hasgeek
$ source ~/python/virt-env/hasgeek/bin/activate
- 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
- 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
- Create Database user in PG-SQL.
$ createdb lastuser
- Customize settings for running it locally
$ cd ~/Code/lastuser
$ sed 's,localhost/lastuser,lastuser,g' instance/settings-sample.py > instance/development.py
- Create Database models for lastuser.
$ python manage.py createdb
- Add entries in /etc/hosts
$ sudo sed -i -e "\$a \\\n# Last User hostname\\n127.0.0.1 lastuser.local" /etc/hosts
- Run the lastuser app in localhost
FLASK_ENV=development ./runserver.py