-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
137 lines (122 loc) · 6.21 KB
/
.env.example
File metadata and controls
137 lines (122 loc) · 6.21 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
####################################################
# .env.production Configuration File
####################################################
# This file serves as a template for configuring environment variables essential for the development environment.
# Adjust these settings to align with your specific development needs and infrastructure requirements.
####################################################
# APPLICATION ENVIRONMENT
# Purpose: Defines the operating mode of the application (development, test, production).
# Use: Toggle features or behaviors based on the application environment.
####################################################
NODE_ENV=production
####################################################
# SERVER CONFIGURATION
# Purpose: Contains settings pertinent to the application server, such as port and API version.
# Use: Facilitate running the server with environment-specific configurations.
####################################################
PORT=8080
VERSION=v1
####################################################
# DATABASE CONFIGURATION
# Purpose: Configuration settings for the application's database connection.
# Use: Establish and manage the connection to the MongoDB database.
####################################################
MONGODB_URL=mongodb+srv://<user>:<password>@cluster0.50yg5.mongodb.net/<databse-name>?retryWrites=true&w=majority&appName=Cluster0
####################################################
# JWT CONFIGURATION
# Purpose: Settings related to JSON Web Tokens for secure authentication and authorization.
# Use: Configure secret keys and token expiration times for various authentication flows.
####################################################
JWT_SECRET=thisisasamplesecret
JWT_ACCESS_EXPIRATION_MINUTES=30
JWT_REFRESH_EXPIRATION_DAYS=30
JWT_RESET_PASSWORD_EXPIRATION_MINUTES=10
JWT_VERIFY_EMAIL_EXPIRATION_MINUTES=10
####################################################
# AUTH CONFIGURATION
# Purpose: Contains settings related to user authentication and authorization.
# Use: Configure settings for user roles, permissions, and other authentication-related features.
####################################################
MAXIMUM_LOGIN_ATTEMPTS=5
MAXIMUM_RESET_PASSWORD_ATTEMPTS=5
MAXIMUM_VERIFY_EMAIL_ATTEMPTS=5
MAXIMUM_CHANGE_EMAIL_ATTEMPTS=5
MAXIMUM_CHANGE_PASSWORD_ATTEMPTS=5
MAXIMUM_ACTIVE_SESSIONS=3
LOCK_DURATION_HOUR=1
####################################################
# TIMEOUT CONFIGURATION
# Purpose: Defines the timeout settings for various operations in the application.
# Use: Configure timeout settings for operations that require a specific time limit.
####################################################
TIMEOUT_IN_SECONDS=120
####################################################
# CACHE CONFIGURATION
# Purpose: Defines settings for caching mechanisms used in the application.
# Use: Configure caching settings for various cache stores (e.g., Redis, Memcached).
####################################################
# 24 * 60 * 60 * 1000 = 86400 ms (1 day)
CACHE_TTL_IN_SECONDS=86400
####################################################
# JSON PAYLOAD CONFIGURATION
# Purpose: Defines settings for JSON payload limits and other related configurations.
# Use: Configure the maximum payload size for JSON requests and other related settings.
####################################################
JSON_PAYLOAD_LIMIT=20
####################################################
# CORS CONFIGURATION
# Purpose: Defines settings for Cross-Origin Resource Sharing (CORS) in the application.
# Use: Configure CORS settings to allow or restrict access to the application from different domains.
####################################################
CORS_ORIGIN=http://localhost:5000
CORS_METHODS=OPTIONS,GET,PUT,POST,DELETE
####################################################
# RATE LIMIT CONFIGURATION
# Purpose: Defines settings for rate limiting in the application.
# Use: Configure rate limiting settings to prevent abuse of the application's resources.
####################################################
# 15 * 60 * 1000 = 900000 ms (15 minutes)
RATE_LIMIT_WINDOW_MS=900000
# 20 requests per windowMs
RATE_LIMIT_MAX=20
####################################################
# EMAIL SERVICE CONFIGURATION
# Purpose: Defines settings for SMTP-based email service used for sending emails from the application.
# Use: Configure connection and authentication details for the email service provider.
####################################################
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=email-server-username
SMTP_PASSWORD=email-server-password
SMTP_MAX_CONNECTION_RETRY_ATTEMPTS=10
EMAIL_FROM=support@yourapp.com
####################################################
# ADMIN CONFIGURATION
# Purpose: Defines settings for the admin user of the application.
# Use: Configure the default admin user's email and password.
####################################################
ADMIN_EMAIL=admin@yourapp.com
ADMIN_PASSWORD=adminSecretPassword
####################################################
# GOOGLE DRIVE SERVICE CONFIGURATION
# Purpose: Optional settings for integrating Google Drive as a file storage solution.
# Use: Specify authentication and folder details for storing files on Google Drive.
####################################################
GOOGLE_DRIVE_CLIENT_EMAIL=google-drive-client-email
GOOGLE_DRIVE_FOLDER_KEY=google-drive-folder-key
GOOGLE_DRIVE_PRIVATE_KEY=google-drive-private-key-in-base64
GOOGLE_DRIVE_SCOPE=https://www.googleapis.com/auth/drive
####################################################
# CLOUDINARY SERVICE CONFIGURATION
# Purpose: Optional settings for integrating Cloudinary as a file storage solution.
# Use: Specify authentication and folder details for storing files on cloudinary.
####################################################
CLOUDINARY_CLOUD_NAME=cloudinary-cloud-name
CLOUDINARY_CLOUD_API_KEY=cloudinary-api-key
CLOUDINARY_CLOUD_API_SECRET=cloudinary-api-secret
####################################################
# GITHUB REPOSITORY CONFIGURATION
# Purpose: Specifies the GitHub repository URL for the project.
# Use: Allows users and developers to access the source code repository directly.
####################################################
GITHUB_REPOSITORY=https://github.com/{user}/{repo}