.env file in the backend/ directory.
Database Configuration
PostgreSQL database connection URL.Format:
postgresql://USER:PASSWORD@HOST:PORT/DATABASEExample: postgresql://postgres:postgres@localhost:5432/portfolioEmail Service
API key for the Resend email service used to send contact form emails.Obtain your API key at: https://resend.com/api-keysFormat:
re_xxxxxxxxxxxxxxxxxxxxxAuthentication
Admin password for accessing email preview endpoints.
Secret key used for signing JWT tokens for authentication.Generate a secure secret:
Server Configuration
The port number on which the backend server will listen.Default:
3001Application environment mode.Values:
development- Uses.envfileproduction- Uses.env.productionfile
developmentEnvironment File Setup
The application loads different environment files based onNODE_ENV:
- Development: Loads
.env - Production: Loads
.env.production
backend/.env.example for a template of all required variables.
