This folder contains important configuration files for setting up the backend application.
This file sets up the database configuration for different stages of development. It helps the application connect to the database depending on whether you are working locally, in a staging environment, or in a production environment.
To keep sensitive information like database credentials safe, we use environment variables. Before running the application, you need to set these variables in your environment. Here’s what you need to set:
DB_USERNAME
: Your PostgreSQL username 🧑💻DB_PASSWORD
: Your PostgreSQL password 🔑DB_NAME
: The name of your PostgreSQL database 📦DB_URL
: A connection URL for PostgreSQL used in staging and production environments 🌐
The configuration is divided into three main parts:
-
Development: Settings for when you're working on your local machine. It uses environment variables to get the database username, password, and name.
-
Staging: Settings for a testing environment that mimics production. It uses the
DB_URL
environment variable to connect to the database and ensures a secure connection with SSL encryption. -
Production: Settings for the live environment where your application will be used by real users. Like staging, it uses the
DB_URL
variable and SSL encryption for secure connections.
Update these settings and environment variables based on your project needs. 🛠️