forked from canada-ca/tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
33 lines (27 loc) · 819 Bytes
/
index.js
File metadata and controls
33 lines (27 loc) · 819 Bytes
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
require('dotenv-safe').config({
allowEmptyValues: true,
example: '.env.example',
})
const {
DB_PASS: rootPass,
DB_URL: url,
DB_NAME: databaseName,
NOTIFICATION_API_KEY,
NOTIFICATION_API_URL,
} = process.env
const { ensure } = require('arango-tools')
const { NotifyClient } = require('notifications-node-client')
const { databaseOptions } = require('./database-options')
const { progressReportService } = require('./src')
const notifyClient = new NotifyClient(NOTIFICATION_API_URL, NOTIFICATION_API_KEY)
;(async () => {
// Generate Database information
const { query } = await ensure({
type: 'database',
name: databaseName,
url,
rootPassword: rootPass,
options: databaseOptions({ rootPass }),
})
await progressReportService({ query, log: console.log, notifyClient })
})()