This is a Next.js project bootstrapped with create-next-app.
First, run the development server with following commands in coding IDE or local terminal:
(first-time to install package dependencies)
npm installEnsure your .env file includes the following variables for local dev:
NODE_ENV=developmentJWT_SECRET="test_jwt_secret"POSTGRES_DB=<come up with your db name>POSTGRES_PASSWORD=<come up with your passwordDATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@localhost:5432/${POSTGRES_DB}?schema=publicDIRECT_URL=postgresql://postgres:${POSTGRES_PASSWORD}@localhost:5432/${POSTGRES_DB}?schema=publicCAS_BASE_URL="https://secure-tst.its.yale.edu/cas"YALIES_API_KEY=<ask admin team>
Build and start the Docker container:
docker compose up -dSync with latest db changes or create if no db:
npx prisma db pushRuns dev server on port 3000
npm run devOpen http://localhost:3000 with your browser to see the result.
To stop all running containers:
docker compose downSeed local DB:
npx prisma db seedInspect local DB:
npx prisma studioStop the containers AND delete all database data (useful for a clean restart):
docker-compose down -vFirst, install Playwright browsers (only needed once after installing Playwright):
npx playwright installThen navigate to testing folder:
cd playwright-testsRun tests:
UI mode (recommended)
npx playwright test --uiNo UI
npx playwright testFor detailed Playwright testing instructions, see playwright-tests/README.md
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
- Next.js deployment documentation - Next.js deployment how-to.