- PostgreSQL
- Node.js
- NPM
# Create a new database
psql -c "create database indieco"
# Import schema
psql --dbname=indieco -f server/schema.sql
# Import data
psql --dbname=indieco -f server/data.sql
npm run devSession cookies are signed with SESSION_SECRET. It is required in production, and the server will not start without it. Generate one with openssl rand -hex 32.
To rotate it, set SESSION_SECRET=new,old: new cookies are signed with the first secret, and cookies signed with the others are still accepted until they expire.
If you own a dataset that was used before migrating to Prisma, just set up your database and use this command to mark the first migration in your database:
# Either prod or development, this marks the first migration as resolved
npx prisma migrate resolve --applied "20220905205917_init"
# Then run all the others migrations
npx prisma migrate deploy
# Verify all migrations have run well and sync with latest schema
npx prisma migrate dev