The database connections should already set up in our config files. However these are .gitignored
and will not show up if the repo is cloned from github. But they will be defined in this repo if you have gained access via, file sharing/zipping. The needed info will be in the server/config.ts file. You might also need to install bcryptjs and @types/bcryptjs to support hashing passwords. We decided to keep these node_module files to make it easier for configuration and usage. They are outside the the main repo.
server/config.ts
:
process.env.MYSQL_HOST = "mysql.stud.ntnu.no";
process.env.MYSQL_USER = "larsmst_Prosjekt";
process.env.MYSQL_PASSWORD = "****";
process.env.MYSQL_DATABASE = "****";
server/test/config.ts
:
process.env.MYSQL_HOST = "mysql.stud.ntnu.no";
process.env.MYSQL_USER = "larsmst_Prosjekt";
process.env.MYSQL_PASSWORD = "****";
process.env.MYSQL_DATABASE = "****";
These environment variables will be used in the server/src/mysql-pool.ts
file.
Install dependencies and start server:
cd server
npm install
npm start
- Note that you need to be present in the server folder
npm test
Install dependencies and bundle client files:
cd client
npm install
npm start
- Note that you need to be present in the client folder
- Note that the test start is edited to support openhandles, ran into a circular json error, that gets handled by that flag
npm test