-
Install dependencies
npm install
-
Create your environment config
touch .env
-
Add required variables
- Refer to
.env.example
for guidance
- Refer to
-
Generate Prisma client
npx prisma generate
-
Run Prisma migrations
npx prisma migrate dev
-
Install Docker
Download Docker Desktop and install it. -
Start the local PostgreSQL database
npm run db:start
If the port is in use, either:
- Kill the container using the port
- Update
POSTGRES_PORT
-
Seed the database
npx prisma db seed
If errors occur, try:
npx prisma db push npx prisma generate npx prisma db seed
-
Start the development server
npm run dev
-
Preview pages Navigate to
http://localhost:3000/chat
Navigate tohttp://localhost:3000/results
Before running any heroku command you must authenticate first.
heroku login
- Opens browser for login.
heroku run npx prisma db seed -a what-if-app
heroku run bash -a what-if-app
heroku pg:psql -a what-if-app
Run queries directly:
heroku pg:psql -a what-if-app -c "SELECT * FROM your_table;"