A small Web application to display an Environment quote. It displays a random quote from a database of quotes.
After "git clone" on this repo, start by creating a Python virtualenv and installing requirements inside the diretory:
$ virtualenv --python=/usr/bin/python3.6 venv
$ source venv/bin/activate
$ pip install -r requirements.txt
Then run the "migrate" command to create the Django sqlite database.
$ python apps/manage.py migrate
Next load in the quotes .json file and runserver:
$ python apps/manage.py loaddata environment.json
$ python apps/manage.py runserver
This is what is needed from the start the server-side.
To start the client-side, NodeJs must be installed. Then npm is used to installed the required packages that are listed in package.json:
$ npm install
Finally start the development server using the command:
$ npm run start
In this application, the deployment to the server packages up the static files and serves them as in a regular Django application before deployment. This step is run on the server:
$ npm run build
$ python manage.py collectstatic