This template should be used as the starting point for your group coursework in the module ECS639U Web Programming (at Queen Mary University of London). Use Git (github.qmul.ac.uk) to collaborate on the coursework with your group members. Module leader: Paulo Oliva <p.oliva@qmul.ac.uk>
To run this project in your development machine, follow these steps:
-
Create and activate a conda environment
-
Download this repo as a zip and add the files to your own private repo.
-
Install Pyhton dependencies (main folder):
$ pip install -r requirements.txt -
Create a development database:
$ python manage.py migrate -
Install JavaScript dependencies (from 'frontend' folder):
$ npm install -
If everything is alright, you should be able to start the Django development server from the main folder:
$ python manage.py runserver -
and the Vue server from the 'frontend' sub-folder:
$ npm run dev -
Open your browser and go to http://localhost:5173, you will be greeted with a template page.
Once your project is ready to be deployed you will need to 'build' the Vue app and place it in Django's static folder.
-
The build command in package.json and the vite.config.ts files have already been modified so that when running 'npm run build' the generated JavaScript and CSS files will be placed in the mainapp static folder, and the index.html file will be placed in the templates folder:
$ npm run build -
You should then follow the instruction on QM+ on how to deploy your app on EECS's OpenShift live server.
This code is dedicated to the public domain to the maximum extent permitted by applicable law, pursuant to CC0.