- Install dependencies
yarn install
- Create .env file
cp .env.example .env
- With local PostgreSQL running, create / migrate / seed db
yarn prisma:update-db-dev
yarn prisma:seed
- Start NextJS server
yarn dev
-
Access local website
-
To visualize / modify DB data
yarn prisma:visualize
- Create .env file
cp .env.example .env
- Create image / run container
docker-compose up
- While containers are running, generate DB tables and data
yarn docker:prisma:update-db-dev
yarn docker:prisma:seed
-
Access local website
-
To visualize / modify DB data (only available running locally for now, not from docker so DATABASE_URL in your .env file should match docker postgres URL and your local node_modules should be installed)
yarn prisma:visualize
To see unpublished categories and questions, navigate to ${SERVER_URL}/api/startPreview?secret=${PREVIEW_SECRET}
where PREVIEW_SECRET
is either coming from your env variables or .env file.
Preview mode lasts for one hour.
To disable preview mode sooner, navigate to ${SERVER_URL}/api/stopPreview