-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.ts
41 lines (35 loc) · 915 Bytes
/
config.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
37
38
39
40
41
const {
LAST_FM_KEY = '',
LAST_FM_SECRET = '',
LAST_FM_USERNAME = '',
SLACK_TOKEN = '',
SLACK_EMOJI = ':headphones:',
SLACK_SEPARATOR = '•',
TZ = 'Australia/Melbourne',
ACTIVE_HOURS_START = '8',
ACTIVE_HOURS_END = '18',
UPDATE_INTERVAL = '1',
UPDATE_WEEKENDS,
SENTRY_DSN
} = process.env
export const lastFM = {
apiUrl: 'http://ws.audioscrobbler.com/2.0',
apiKey: LAST_FM_KEY,
apiSecret: LAST_FM_SECRET,
username: LAST_FM_USERNAME
}
export const slack = {
apiUrl: 'https://slack.com/api',
token: SLACK_TOKEN,
emoji: SLACK_EMOJI,
separator: SLACK_SEPARATOR
}
export const activeHours = {
start: Number(ACTIVE_HOURS_START),
end: Number(ACTIVE_HOURS_END)
}
export const sentryDsn = SENTRY_DSN
/** Time in minutes to request new Last.fm data */
export const updateInterval = Number(UPDATE_INTERVAL)
export const updateWeekends = !!UPDATE_WEEKENDS
export const tz = TZ