-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.ts
More file actions
67 lines (63 loc) · 1.46 KB
/
index.ts
File metadata and controls
67 lines (63 loc) · 1.46 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
import development from "./development";
import staging from "./staging";
import production from "./production";
import production2023 from "./production2023";
import production2024 from "./production2024";
import production2025 from "./production2025";
const env = process.env.NODE_ENV || "development";
if (
![
"development",
"staging",
"production",
"production2023",
"production2024",
"production2025"
].includes(env)
)
throw new Error(`Config file for environment ${env} could not be found.`);
const config: Config = {
production,
production2023,
production2024,
production2025,
staging,
development
}[env];
export default config;
export interface Config {
branch: string;
server: {
port: number;
domain: string;
};
db?: {
database: string;
username: string;
password: string;
host: string;
port: number;
};
auth?: {
cookieKeys: string[];
access: {
restricted: boolean;
username?: string;
password?: string;
};
ci: {
deploy: string;
};
scoutingKeys: string[];
tba: string;
scoutingAdmins: string[];
blacklist: string[];
scoutingInternal: {
teamNumber: string;
accessToken: string;
};
adminTokens: any;
};
features: string[];
year: number;
}