forked from billbarsch/myzap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
60 lines (54 loc) · 1.78 KB
/
config.js
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
/*##############################################################################
# File: config.js #
# Project: myzap2.0 #
# Created Date: 2021-06-21 12:52:13 #
# Author: Eduardo Policarpo #
# Last Modified: 2021-07-23 15:07:40 #
# Modified By: Eduardo Policarpo #
##############################################################################*/
//'use strict';
import dotenv from "dotenv";
import assert from "assert";
dotenv.config();
const {
PORT,
HOST,
TOKEN,
HTTPS,
DOMAIN_SSL,
ENGINE,
SSL_KEY_PATH,
SSL_CERT_PATH,
API_KEY,
AUTH_DOMAIN,
PROJECT_ID,
STORAGE_BUCKET,
MESSAGING_SENDER_ID,
APP_ID,
START_ALL_SESSIONS,
FORCE_CONNECTION_USE_HERE
} = process.env;
assert(PORT, 'PORT is required, please set the PORT variable value in the .env file');
assert(HOST, 'HOST is required, please set the HOST variable value in the .env file');
assert(TOKEN, 'TOKEN is required, please set the ENGINE variable value in the .env file');
assert(ENGINE, 'ENGINE is required, please set the ENGINE variable value in the .env file');
export default {
port: PORT,
host: HOST,
token: TOKEN,
https: HTTPS,
host_ssl: DOMAIN_SSL,
engine: ENGINE,
ssl_key_path: SSL_KEY_PATH,
ssl_cert_path: SSL_CERT_PATH,
firebaseConfig: {
apiKey: API_KEY,
authDomain: AUTH_DOMAIN,
projectId: PROJECT_ID,
storageBucket: STORAGE_BUCKET,
messagingSenderId: MESSAGING_SENDER_ID,
appId: APP_ID
},
start_all_sessions: START_ALL_SESSIONS,
useHere: FORCE_CONNECTION_USE_HERE,
}