Configuration
Environment variables and database initialization.
Create and configure the .env file:
cp .env.example .env
# Edit .env with your settings:| Variable | Required | Example |
|---|---|---|
| DATABASE_URL | ✓ | postgresql://library:password@localhost:5432/library |
| AUTH_SECRET | ✓ | $(openssl rand -hex 32) |
| AUTH_URL | ✓ | http://localhost:3000 |
| GOOGLE_CLIENT_ID | — | xxx.apps.googleusercontent.com |
| GOOGLE_CLIENT_SECRET | — | GOCSPX-xxx |
Initialize Database
npx prisma generate
npx prisma db push
npm run db:seedSeed Complete: An admin account is created:
admin@pvdlibrary.com/admin123. Change this password immediately in production.