This project contains the starting blocks for deploying your student project on a server, as well as running the project in debug mode locally during development.
The following instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- Node.js (>=10)
- PM2 (http://pm2.keymetrics.io/)
Install Node.js from the website (see below).
Install PM2 with the following command : npm install -g pm2
(note that sudo
may be required on Linux/macOS to allow global installation).
In package.json
, replace all occurrences of prj645-grpXX
with your own group number, for example prj645-grp03
for group number 3.
Also, copy the env-example
file to .env
and modify the values according to your needs:
DB_PROTOCOL
: Should bemysql
normally.DB_USER
,DB_PASSWORD
: Put your user credentials here. If you run a local instance of MySQL on your machine, you can use theroot
user, on the server use the credentials provided for your group (used for phpMyAdmin).DB_HOST
: Is usuallylocalhost
, but you can replace it with the project server's URL if you want to connect to it from your local machine.DB_PORT
: Should be3306
normally.DB_DATABASE
: This can be whatever you want on your local machine, but needs to be your group name on the server (e.g.grpXX
).PORT
: This is the port that will be used by your Express app. Replace it with100XX
, whereXX
is your group number, e.g.10008
for group 8.NODE_ENV
: Eitherdevelopment
for local testing orproduction
on the server.
Run npm run debug
Run npm start
Run npm stop
or npm run delete
, respectively.
- Node.js - Programming platform
- Express - Web Framework
- Sequelize - ORM
- Handlebars - Template engine
- Roger Schaer - roger-schaer
This project is licensed under the MIT License - see the LICENSE.md file for details