|
|
|
# Onboarding Setup
|
|
|
|
|
|
|
|
## Installing Node.js
|
|
|
|
[Download and install](https://nodejs.org/en/download) for your distribution
|
|
|
|
|
|
|
|
## Installing Heatwise
|
|
|
|
1. Clone the project
|
|
|
|
```bash
|
|
|
|
git clone https://git.cardiff.ac.uk/c21048229/cm6311-group-6.git
|
|
|
|
```
|
|
|
|
2. Install packages
|
|
|
|
```bash
|
|
|
|
npm install
|
|
|
|
```
|
|
|
|
3. Create `.env` file based off `.env.example`
|
|
|
|
|
|
|
|
|
|
|
|
## Setup Database Locally
|
|
|
|
|
|
|
|
We are using [Prisma ORM](https://www.prisma.io/) and Postgres
|
|
|
|
|
|
|
|
1. [Install Postgres](https://www.postgresql.org/download/)
|
|
|
|
2. Run `npx prisma migrate reset` to reset any existing database config on your computer and make it fresh for new data
|
|
|
|
3. Download the latest pg_dump from a colleague. Due to the sensitive nature of the database, backups are not yet available online
|
|
|
|
4. Restore the pg_dump using psql (Typical windows install: `C:/Program Files/PostgreSQL/15/bin/psql.exe`)
|
|
|
|
|
|
|
|
**Whenever doing schema changes, be sure to run `npx prisma migrate deploy` after and add a relevant migration text (like git commit messages) for the database change done.**
|
|
|
|
|
|
|
|
## Development
|
|
|
|
Follow steps on the readme to run tests and development server locally |
|
|
\ No newline at end of file |