Skip to content

jevote-info/website

Repository files navigation

jevote.info banner

Local development

  1. Install dependencies
yarn install
  1. Create .env file
cp .env.example .env
  1. With local PostgreSQL running, create / migrate / seed db
yarn prisma:update-db-dev
yarn prisma:seed
  1. Start NextJS server
yarn dev
  1. Access local website

  2. To visualize / modify DB data

yarn prisma:visualize

Local development with docker

  1. Create .env file
cp .env.example .env
  1. Create image / run container
docker-compose up
  1. While containers are running, generate DB tables and data
yarn docker:prisma:update-db-dev
yarn docker:prisma:seed
  1. Access local website

  2. 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

Preview mode

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published