-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.sample
More file actions
61 lines (50 loc) · 2.15 KB
/
Copy path.env.sample
File metadata and controls
61 lines (50 loc) · 2.15 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
# ===============================
# 🌐 MongoDB Database Connection
# ===============================
MONGODB_URI=mongodb+srv://<username>:<password>@cluster0.mongodb.net/<dbname>?retryWrites=true&w=majority
# Replace <username>, <password>, and <dbname> with your actual MongoDB credentials.
# ===============================
# 🔌 Server Configuration
# ===============================
PORT=8000
# The port your Node.js server will run on.
# Common ports: 3000, 4000, 5000, 8000
# ===============================
# 🔐 CORS (Cross-Origin Resource Sharing)
# ===============================
CORS_ORIGIN=http://localhost:3000
# The frontend origin that is allowed to access this backend.
# In production, use your domain name:
# Example: CORS_ORIGIN=https://yourfrontend.com
# ===============================
# 🔐 JWT Authentication
# ===============================
# ➤ Access Token Settings
ACCESS_TOKEN_SECRET=your_access_token_secret_here
# A strong secret key used to sign access tokens.
# Generate a secure secret using:
# node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
ACCESS_TOKEN_EXPIRATION=15m
# Access token expiration time.
# Format examples: "15m" = 15 minutes, "1h" = 1 hour, "1d" = 1 day
# ➤ Refresh Token Settings
REFRESH_TOKEN_SECRET=your_refresh_token_secret_here
# Secret key for signing refresh tokens (keep this different from access secret).
REFRESH_TOKEN_EXPIRATION=7d
# Refresh token expiration time.
# Example: "7d" = 7 days, "30d" = 30 days
# ===============================
# ☁️ Cloudinary Configuration
# ===============================
CLOUDINARY_CLOUD_NAME=your_cloud_name
# Your Cloudinary cloud name found in your dashboard.
# Example: CLOUDINARY_CLOUD_NAME=mycloud123
CLOUDINARY_API_KEY=your_cloudinary_api_key
# API Key provided by Cloudinary for your account.
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
# API Secret provided by Cloudinary (keep this private).
# ===============================
# ✅ Additional Notes
# ===============================
# ❗ DO NOT commit your actual `.env` file to version control (e.g., GitHub).
# ✅ Use `.env.example` as a reference and add `.env` to your `.gitignore`.