-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
43 lines (35 loc) · 1.27 KB
/
.env.example
File metadata and controls
43 lines (35 loc) · 1.27 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
# Server Configuration
PORT=8080
SERVER_READ_TIMEOUT=10s
SERVER_WRITE_TIMEOUT=10s
SERVER_IDLE_TIMEOUT=120s
# Database Configuration
# Use one of: postgres, mysql, sqlserver
DB_DRIVER=postgres
DB_HOST=localhost
DB_PORT=5432
DB_USER=commerce
DB_PASSWORD=commerce
DB_NAME=commerce
# PostgreSQL DSN (constructed from above variables)
DB_DSN=postgres://commerce:commerce@localhost:5432/commerce?sslmode=disable
# MySQL Example
# DB_DSN=username:password@tcp(localhost:3306)/gocommerce?parseTime=true
# SQL Server Example
# DB_DSN=sqlserver://username:password@localhost:1433?database=gocommerce
DB_MAX_OPEN_CONNS=25
DB_MAX_IDLE_CONNS=5
DB_CONN_MAX_LIFETIME=5m
# JWT Configuration
# IMPORTANT: Generate a secure random string of at least 32 characters
JWT_SECRET=your-super-secret-jwt-key-minimum-32-characters-long-change-this
JWT_ACCESS_TOKEN_EXPIRY=15m
JWT_REFRESH_TOKEN_EXPIRY=168h
JWT_ISSUER=gocommerce-api
JWT_AUDIENCE=gocommerce-api-users
# Google OAuth Configuration
GOOGLE_CLIENT_ID=your-google-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-google-client-secret
GOOGLE_REDIRECT_URL=http://localhost:8080/api/v1/auth/google/callback
# Optional: Set to "true" to seed the database with sample data (for development)
SEED_DB=false