- Install any database management client you feel comfortable with like: pgadmin, DBeaver etc.
- Ensure that you remeber the username and password you used to create the primary user of your DB client
- Create one database on your client (you may call it anything but it would be preferable to name it something logical)
- Clone the repository
- Install Node
- Make sure you have install npm (Node package manager) on your machine
- Run this command in the termainal of the project
npm install
This will install all of the dependancies of the project. 5. Make sure that you change the connection string inside the .env file to the DB on your local machine. The format is:
postgresql://USER:PASSWORD@HOST:PORT/DATABASE?schema=SCHEMA
- To run the migration to update your database run the following command:
npx prisma migrate dev
- To run the backend enter the command below in the root directory of the project:
npm start
- Alternatively run
docker-compose up -d
within this root dir to spin up a postgres docker container
- login to pgadmin with credentials:
- username: [email protected]
- password: password
- add postgres server to pgadmin:
- Servers -> Create -> Server
- General -> Name: docker
- Connection -> Host name: sa_pg_container
- Connection -> Port: 5432
- Connection -> Maintenance database: sa_db
- Connection -> Username: postgres
- Connection -> Password: password
- Connection -> Save password: true
- Click Save
- To seed your database, open a browser and insert this url: http://localhost:8081/seed