2021-12-29 11:56:55 +08:00
|
|
|
/* eslint-disable import/first */
|
2021-07-11 17:59:44 +08:00
|
|
|
import 'module-alias/register.js';
|
2021-07-02 22:55:14 +08:00
|
|
|
|
2021-06-26 01:39:02 +08:00
|
|
|
import dotenv from 'dotenv';
|
2021-08-30 11:30:54 +08:00
|
|
|
import Koa from 'koa';
|
2021-07-11 17:59:44 +08:00
|
|
|
|
2021-12-29 11:56:55 +08:00
|
|
|
dotenv.config();
|
|
|
|
|
2021-08-11 22:37:21 +08:00
|
|
|
import initApp from './app/init';
|
2021-12-03 14:04:30 +08:00
|
|
|
import { trustingTlsOffloadingProxies } from './env/consts';
|
2021-08-30 11:30:54 +08:00
|
|
|
import initI18n from './i18n/init';
|
2021-06-06 18:30:37 +08:00
|
|
|
|
2021-12-03 14:04:30 +08:00
|
|
|
const app = new Koa({
|
|
|
|
proxy: trustingTlsOffloadingProxies,
|
|
|
|
});
|
2021-06-06 18:30:37 +08:00
|
|
|
|
2021-06-27 20:44:05 +08:00
|
|
|
(async () => {
|
|
|
|
try {
|
2021-07-28 01:13:51 +08:00
|
|
|
await initI18n();
|
2021-07-09 23:25:24 +08:00
|
|
|
await initApp(app);
|
2021-06-27 20:44:05 +08:00
|
|
|
} catch (error: unknown) {
|
|
|
|
console.log('Error while initializing app', error);
|
|
|
|
}
|
|
|
|
})();
|