-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js
More file actions
26 lines (20 loc) · 768 Bytes
/
config.js
File metadata and controls
26 lines (20 loc) · 768 Bytes
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
// Read environment variables from .env file
require('dotenv').config();
// Get the route file from the environment
if (!process.env.WEBHOOK_DISPATCHER_ROUTE_FILE) {
console.log('WEBHOOK_DISPATCHER_ROUTE_FILE environment variable not set');
}
// Get the route file from the environment
const routeFile = process.env.WEBHOOK_DISPATCHER_ROUTE_FILE;
// Check if DEBUG environment variable is set
const debug = !!process.env.WEBHOOK_DISPATCHER_DEBUG;
// Set the local port to listen on for the app
const port = process.env.WEBHOOK_DISPATCHER_PORT || 3000;
// Get the webhook secret from the environment or use a default value
const webhookSecret = process.env.WEBHOOK_DISPATCHER_WEBHOOK_SECRET;
module.exports = {
debug,
port,
routeFile,
webhookSecret,
};