bugfix: .env.example files updated. some minor changes in jwt strategy to avoid failing when .env files does not contain needed keys.
This commit is contained in:
@@ -1,23 +1,41 @@
|
||||
# Database
|
||||
DATABASE_URL=postgresql://dyolink_user:password@postgres:5432/dyolink_db
|
||||
POSTGRES_HOST=postgres
|
||||
#
|
||||
# Local dev (Nest on your machine + Postgres via docker-compose.postgres.yml):
|
||||
# Use host "localhost" — hostname "postgres" only works inside Docker networks.
|
||||
DATABASE_URL=postgresql://dyolink_user:password@localhost:5432/dyolink_db
|
||||
POSTGRES_HOST=localhost
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_USER=dyolink_user
|
||||
POSTGRES_PASSWORD=CHANGE_ME_IN_PRODUCTION
|
||||
POSTGRES_PASSWORD=password
|
||||
POSTGRES_DB=dyolink_db
|
||||
#
|
||||
# If you run the API inside the same Compose stack as Postgres, use instead:
|
||||
# DATABASE_URL=postgresql://dyolink_user:password@postgres:5432/dyolink_db
|
||||
# POSTGRES_HOST=postgres
|
||||
|
||||
# JWT
|
||||
# JWT (required for register/login)
|
||||
JWT_SECRET=CHANGE_ME_TO_A_STRONG_SECRET_32_CHARS_MIN
|
||||
JWT_EXPIRES_IN=7d
|
||||
JWT_REFRESH_SECRET=CHANGE_ME_TO_ANOTHER_STRONG_SECRET
|
||||
JWT_REFRESH_EXPIRES_IN=30d
|
||||
|
||||
# Application
|
||||
PORT=3000
|
||||
NODE_ENV=development
|
||||
API_PREFIX=/api
|
||||
CORS_ORIGIN=http://localhost:3000
|
||||
# CORS and invite links — must match the URL where the Next.js app runs
|
||||
FRONTEND_URL=http://localhost:3001
|
||||
|
||||
# OAuth (optional — uncomment when configured)
|
||||
# GOOGLE_CLIENT_ID=your-google-client-id
|
||||
# GOOGLE_CLIENT_SECRET=your-google-client-secret
|
||||
# GOOGLE_CALLBACK_URL=http://localhost:3000/auth/google/callback
|
||||
# FACEBOOK_CLIENT_ID=your-facebook-app-id
|
||||
# FACEBOOK_CLIENT_SECRET=your-facebook-app-secret
|
||||
# FACEBOOK_CALLBACK_URL=http://localhost:3000/auth/facebook/callback
|
||||
|
||||
# Email (configure for production)
|
||||
SMTP_HOST=smtp.gmail.com
|
||||
SMTP_PORT=587
|
||||
SMTP_USER=your_email@gmail.com
|
||||
SMTP_PASSWORD=your_app_password
|
||||
SMTP_PASSWORD=your_app_password
|
||||
|
||||
Reference in New Issue
Block a user