-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathenv.ts
36 lines (33 loc) · 1.23 KB
/
env.ts
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
const env = {
// URL/source to the logo on all pages
ICON_SRC: process.env.ICON_SRC || '/static/images/Abakule.jpg',
// Node environment. 'development', 'test' or 'production'
NODE_ENV: process.env.NODE_ENV || 'development',
// Vote release version
RELEASE: process.env.RELEASE || 'latest',
// This cannot be empty when running in production
COOKIE_SECRET: process.env.COOKIE_SECRET,
PORT: process.env.PORT || 3000,
// Host used when binding. Use 0.0.0.0 to bind all interfaces
HOST: process.env.HOST || 'localhost',
MONGO_URL: process.env.MONGO_URL || 'mongodb://0.0.0.0:27017/vote',
MONGO_DB:
process.env.NODE_ENV == 'test' && process.env.VITEST_WORKER_ID
? `vote-test-${process.env.VITEST_WORKER_ID}`
: null,
REDIS_URL: process.env.REDIS_URL || 'localhost',
FRONTEND_URL:
process.env.FRONTEND_URL ||
(!process.env.NODE_ENV || process.env.NODE_ENV === 'development'
? 'http://localhost:5173'
: 'http://localhost:3000'),
// Mail settings
FROM: process.env.FROM || 'Abakus',
FROM_MAIL: process.env.FROM_MAIL || '[email protected]',
// Use one of the below
GOOGLE_AUTH: process.env.GOOGLE_AUTH,
SMTP_URL: process.env.SMTP_URL,
// TODO FIXME
RAVEN_DSN: '',
};
export default env;