-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
65 lines (63 loc) · 2.58 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
61
62
63
64
65
require("dotenv").config();
if (typeof process.env.GS_API_KEY === "undefined") {
throw new Error("Cant find GS_API_KEY as a env.var");
}
if (typeof process.env.GS_SHEET_ID === "undefined") {
throw new Error("Cant find GS_SHEET_ID as a env.var");
}
if (typeof process.env.GS_SPREADSHEET_ID === "undefined") {
throw new Error("Cant find GS_GS_SPREADSHEET_ID_ID as a env.var");
}
if (typeof process.env.GS_CHEK_INTERVAL_SEC === "undefined") {
throw new Error("Cant find GS_CHEK_INTERVAL_SEC as a env.var");
}
if (typeof process.env.GS_START_EVENT_TEXT === "undefined") {
throw new Error("Cant find GS_START_EVENT_TEXT as a env.var");
}
if (typeof process.env.GS_STOP_EVENT_TEXT === "undefined") {
throw new Error("Cant find GS_STOP_EVENT_TEXT as a env.var");
}
if (typeof process.env.GS_ROW_START === "undefined") {
throw new Error("Cant find GS_ROW_START as a env.var");
}
if (typeof process.env.GS_START_TIME_COLUMN === "undefined") {
throw new Error("Cant find GS_START_TIME_COLUMN as a env.var");
}
if (typeof process.env.GS_END_TIME_COLUMN === "undefined") {
throw new Error("Cant find GS_END_TIME_COLUMN as a env.var");
}
if (typeof process.env.GS_TITTEL_COLUMN === "undefined") {
throw new Error("Cant find GS_TITTEL_COLUMN as a env.var");
}
if (typeof process.env.GS_DESCRIPTION_COLUMN === "undefined") {
throw new Error("Cant find GS_DESCRIPTION_COLUMN as a env.var");
}
if (typeof process.env.GS_CATEGORY_COLUMN === "undefined") {
throw new Error("Cant find GS_CATEGORY_COLUMN as a env.var");
}
if (typeof process.env.GS_TAGS_COLUMN === "undefined") {
throw new Error("Cant find GS_TAGS_COLUMN as a env.var");
}
if (typeof process.env.GS_STARTSTOP_EVENT_COLUMN === "undefined") {
throw new Error("Cant find GS_STARTSTOP_EVENT_COLUMN as a env.var");
}
if (typeof process.env.YOUTUBE_STREAM_KEY === "undefined") {
throw new Error("Cant find YOUTUBE_STREAM_KEY as a env.var");
}
module.exports = {
apiKey: process.env.GS_API_KEY,
sheetId: process.env.GS_SHEET_ID,
spreadsheetId: process.env.GS_SPREADSHEET_ID,
intervalSec: process.env.GS_CHEK_INTERVAL_SEC,
startEventText: process.env.GS_START_EVENT_TEXT,
stopEventText: process.env.GS_STOP_EVENT_TEXT,
rowStart: process.env.GS_ROW_START,
startTimeColumn: process.env.GS_START_TIME_COLUMN,
endTimeColumn: process.env.GS_END_TIME_COLUMN,
tittelColumn: process.env.GS_TITTEL_COLUMN,
descriptionColumn: process.env.GS_DESCRIPTION_COLUMN,
categoryColumn: process.env.GS_CATEGORY_COLUMN,
tagsColumn: process.env.GS_TAGS_COLUMN,
eventColumn: process.env.GS_STARTSTOP_EVENT_COLUMN,
youtubeStreamKey: process.env.YOUTUBE_STREAM_KEY
};