Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 962 Bytes

database.md

File metadata and controls

50 lines (33 loc) · 962 Bytes

Database

Connecting to the database

Prerequisites

Ensure the database docker container is running. You can start it by running the application:

npm run dev

Connect to the database

To connect to the database, run the following command from the root of the repo:

npm run db:connect

Seeding

Prerequisites

Before running the seed command, you must tell the application what credentials you will be using to login. Run the following command from the root of the repo:

cp packages/data/src/prisma/seed/local.example.json packages/data/src/prisma/seed/local.json

And replace the values with your own credentials:

local.json

{
  "user": {
    "email": "YOUR_EMAIL_HERE",
    "password": "YOUR_PASSWORD_HERE"
  }
}

Running the seed command

To populate the database with some sample data for a user, run the following command from the root of the repo:

npm run db:seed