Skip to content

Commit d87749f

Browse files
committed
Added Env Examples
1 parent ab8c49d commit d87749f

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

backend/.env.example

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Database Configuration
2+
# Copy this file to .env and fill in your actual values
3+
4+
# PostgreSQL Database Configuration
5+
DB_NAME=postgres
6+
DB_HOST=localhost
7+
DB_USER=postgres
8+
DB_PASS=postgres
9+
DB_PORT=5432
10+
11+
# Alternative: Full Database URL (overrides individual settings above)
12+
# DATABASE_URL=postgresql://username:password@localhost:5432/dbname
13+
14+
# Example configurations for different environments:
15+
16+
# Local Development
17+
# DB_NAME=crud_api_dev
18+
# DB_HOST=localhost
19+
# DB_USER=postgres
20+
# DB_PASS=your_password
21+
# DB_PORT=5432
22+
23+
# Docker Compose (with PostgreSQL service)
24+
# DB_NAME=crud_api
25+
# DB_HOST=postgres
26+
# DB_USER=postgres
27+
# DB_PASS=postgres
28+
# DB_PORT=5432
29+
30+
# Cloud PostgreSQL (example for Railway, Heroku, etc.)
31+
# DATABASE_URL=postgresql://username:password@hostname:port/database
32+
33+
# Testing Environment
34+
# DATABASE_URL=postgresql://postgres:postgres@localhost:5432/test_db

0 commit comments

Comments
 (0)