formies/.env.test
Mohamad.Elsena 2927013a6d Update environment configuration, add API documentation, and implement user authentication system
- Updated `.env` and added `.env.test` for environment variables.
- Introduced API documentation in `API_DOCUMENTATION.md`.
- Added authentication setup guide in `AUTHENTICATION_SETUP.md`.
- Implemented user authentication with JWT and email verification.
- Created new routes for user management and form submissions.
- Added middleware for API key authentication and error handling.
- Set up Redis for rate limiting and notifications.
- Removed obsolete files and configurations related to the previous Rust implementation.
2025-05-28 11:18:35 +02:00

43 lines
1.4 KiB
Plaintext

# .env.test
NODE_ENV=test
PORT=3001 # Use a different port for testing if your main app might be running
# Test Database Configuration (use a SEPARATE database for testing)
DB_HOST=localhost # Or your test DB host
DB_USER=your_test_db_user
DB_PASSWORD=your_test_db_password
DB_NAME=forms_db_test # CRITICAL: Use a different database name
# JWT Configuration (can be the same as dev, or specific test secrets)
JWT_SECRET=your-super-secret-jwt-key-for-tests-only-make-it-different
JWT_ISSUER=formies-test
JWT_AUDIENCE=formies-users-test
JWT_ACCESS_EXPIRY=5s # Short expiry for testing expiration
JWT_REFRESH_EXPIRY=10s
# Session Configuration
SESSION_SECRET=your-test-session-secret-key
# Application Configuration
APP_URL=http://localhost:3001
# Email Configuration (mocked or use a test service like Mailtrap.io)
SMTP_HOST=
SMTP_PORT=
SMTP_SECURE=
SMTP_USER=
SMTP_PASS=
SMTP_FROM_EMAIL=
RESEND_API_KEY=test_resend_key # So it doesn't try to send real emails
EMAIL_FROM_ADDRESS=test@formies.local
# Notification Configuration
NTFY_ENABLED=false # Disable for tests unless specifically testing ntfy
# reCAPTCHA (use test keys or disable for most tests)
RECAPTCHA_V2_SITE_KEY=your_test_recaptcha_site_key
RECAPTCHA_V2_SECRET_KEY=your_test_recaptcha_secret_key # Google provides test keys that always pass/fail
# Legacy Admin (if still relevant)
ADMIN_USER=testadmin
ADMIN_PASSWORD=testpassword