Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
66 lines (57 loc) · 2.61 KB
/
Copy path.env.example
File metadata and controls
66 lines (57 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# ============================================================================
# FastAPI Boilerplate - Environment Variables Example
# ============================================================================
# This file serves as a template for environment variables configuration.
# Copy this file to .env and customize the values as needed.
#
# Note: This project uses direnv (.envrc) which automatically loads this
# .env file if it exists. The .envrc file also provides default values
# for all variables, so creating a .env file is optional unless you need
# to override the defaults.
#
# ============================================================================
# Application Configuration
# ============================================================================
# Debug mode
# Enable detailed error messages and debugging information
# Values: true, false
# Default: false
DEBUG=false
# API prefix (versioned)
# Base path for all API endpoints
# Default: /api/v1
API_PREFIX=/api/v1
# ============================================================================
# Server Configuration
# ============================================================================
# Server host address
# Use 0.0.0.0 to accept connections from any network interface
# Use 127.0.0.1 to only accept local connections
# Default: 127.0.0.1
HOST=127.0.0.1
# Server port
# The port on which the FastAPI server will listen
# Default: 8000
PORT=8000
# ============================================================================
# Database Configuration
# ============================================================================
# Database connection URL
# SQLite database path (relative to project root or executable location)
# For SQLite: sqlite:///./data/app.db
# For PostgreSQL: postgresql://user:password@localhost/dbname
# For MySQL: mysql://user:password@localhost/dbname
# Default: sqlite:///./data/app.db
DATABASE_URL=sqlite:///./data/app.db
# ============================================================================
# CORS Configuration
# ============================================================================
# CORS allowed origins
# Comma-separated list of allowed origins for Cross-Origin Resource Sharing
# This is essential when the frontend runs on a different port or domain
# Examples:
# - Single origin: http://localhost:3000
# - Multiple origins: http://localhost:3000,http://localhost:3001,http://localhost:5173
# - Production: https://app.example.com,https://www.example.com
# Default: http://localhost:3000,http://localhost:3001,http://localhost:5173
CORS_ORIGINS=http://localhost:3000,http://localhost:3001,http://localhost:5173