formies/.env.test
Mohamad.Elsena a3236ae9d5 Refactor environment configuration for PostgreSQL and enhance application structure
- Updated `.env` and `.env.test` files to include PostgreSQL connection settings and Redis configuration.
- Migrated database from SQLite to PostgreSQL, updating relevant queries and connection logic.
- Enhanced error handling and logging throughout the application.
- Added new test utilities for PostgreSQL integration and updated user model methods.
- Introduced new routes for user authentication and form management, ensuring compatibility with the new database structure.
- Created login and registration views in EJS for user interaction.
2025-05-28 16:16:33 +02:00

32 lines
891 B
Plaintext

# .env.test
NODE_ENV=test
PORT=3001 # Different port for test server
DB_HOST=localhost
DB_USER=your_test_pg_user
DB_PASSWORD=your_test_pg_password
DB_NAME=formies_test_db # CRITICAL: MUST BE A TEST DATABASE
DB_PORT=5432
JWT_SECRET=a_different_test_secret_key_that_is_very_long_and_secure
JWT_ISSUER=formies-test
JWT_AUDIENCE=formies-users-test
JWT_ACCESS_EXPIRY=5s
JWT_REFRESH_EXPIRY=10s
SESSION_SECRET=another_test_session_secret
APP_URL=http://localhost:3001
# Mocked or test service creds
RESEND_API_KEY=test_resend_key # For email service mocking
EMAIL_FROM_ADDRESS=test@formies.local
NTFY_ENABLED=false
RECAPTCHA_V2_SITE_KEY=6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MM_sF2s_ # Google's test site key
RECAPTCHA_V2_SECRET_KEY=6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe # Google's test secret key
REDIS_HOST=localhost
REDIS_PORT=6379 # Assuming test Redis runs on default port
REDIS_PASSWORD=