Skip to content

davgibbs/quotes-display

This branch is 1 commit ahead of master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8591025 · May 27, 2021

History

57 Commits
Oct 11, 2019
Aug 18, 2019
Sep 6, 2019
Jul 24, 2019
Aug 18, 2019
Oct 6, 2019
May 27, 2021
Oct 10, 2019
Dec 4, 2019
Oct 10, 2019
Sep 11, 2019

Repository files navigation

quotes-display

A small Web application to display an Environment quote. It displays a random quote from a database of quotes.

Environment Quotes

Developer Information

Local development setup

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

Server setup

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