-
Notifications
You must be signed in to change notification settings - Fork 21
/
index.ts
35 lines (29 loc) · 1.05 KB
/
index.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
/*
* Copyright ©️ 2018-2020 Galt•Project Society Construction and Terraforming Company
* (Founded by [Nikolai Popeka](https://github.com/npopeka)
*
* Copyright ©️ 2018-2020 Galt•Core Blockchain Company
* (Founded by [Nikolai Popeka](https://github.com/npopeka) by
* [Basic Agreement](ipfs/QmaCiXUmSrP16Gz8Jdzq6AJESY1EAANmmwha15uR3c1bsS)).
*/
import {IGeesomeApp} from "./app/interface";
import GeesomeApp from './app/index.js';
(async () => {
const databaseConfig: any = {};
if (process.env.DATABASE_NAME) {
databaseConfig.name = process.env.DATABASE_NAME;
}
const storageConfig: any = {};
if (process.env.STORAGE_REPO) {
storageConfig.repo = process.env.STORAGE_REPO;
}
const app: IGeesomeApp = await GeesomeApp({
databaseConfig,
storageConfig: {jsNode: storageConfig, goNode: storageConfig}
});
await (await import('./publish-docs.js')).default(app);
})();
process.on('uncaughtException', (err) => {
console.error('There was an uncaught error', err);
// process.exit(1) //mandatory (as per the Node docs)
});