Skip to content

Frontend Development Guide

Matrix Doge edited this page Nov 5, 2018 · 6 revisions

This document will guide you through the steps of setting up a local development environment on your own machine. It will assume that you have the latest files from the master branch.

First, goto iQueensu/settings.py and set LOCAL_DEBUG to True:

LOCAL_DEBUG = False

To LOCAL_DEBUG = True

This will basically enable two things:

  1. Setting the website database to a local sqlite database instead of the mysql one online.
  2. Allow CORS cross origin requests from "http://localhost:3000" which is the default address that npm debugging server runs on.

Second, download the debug sqlite database, from:

https://www.dropbox.com/s/kgdcu6n5o5tnvye/db.sqlite3?dl=0

And place it under the root directory of iQueensu project

With the debug database, you do not need to rebuild and migrate models. And it will have some sample data for you to test.

Third, start your debug server:

You need to start your python django server preferably from PyCharm And cd(change directory) to iQueensu/frontend/qhome

And run npm start

You should be able to access your page at: http://localhost:3000

To modify the contents on the frontend page, you should only make changes to the files under: iQueensu/frontend/qhome/src/qhome

Please note: You should not commit and push any files that is not under: iQueensu/frontend/qhome/src/qhome

Clone this wiki locally