-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
21 lines (20 loc) · 933 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module.exports = {
setup: async () => {
if (process.env.MAXMIND_GEOIP_STORAGE) {
const Storage = require('@userdashboard/dashboard/src/storage.js')
const storage = await Storage.setup('MAXMIND_GEOIP')
const StorageList = require('@userdashboard/dashboard/src/storage-list.js')
const storageList = await StorageList.setup(storage, 'MAXMIND_GEOIP')
const StorageObject = require('@userdashboard/dashboard/src/storage-object.js')
const storageObject = await StorageObject.setup(storage, 'MAXMIND_GEOIP')
module.exports.Storage = storage
module.exports.StorageList = storageList
module.exports.StorageObject = storageObject
} else {
const dashboard = require('@userdashboard/dashboard')
module.exports.Storage = dashboard.Storage
module.exports.StorageList = dashboard.StorageList
module.exports.StorageObject = dashboard.StorageObject
}
}
}