0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-27 21:39:16 -05:00
logto/packages/core/src/index.ts
2022-01-27 19:26:34 +08:00

27 lines
611 B
TypeScript

import 'module-alias/register.js';
import dotenv from 'dotenv';
import Koa from 'koa';
dotenv.config();
/* eslint-disable import/first */
import initApp from './app/init';
import { initConnectors } from './connectors';
import { trustingTlsOffloadingProxies } from './env/consts';
import initI18n from './i18n/init';
/* eslint-enable import/first */
const app = new Koa({
proxy: trustingTlsOffloadingProxies,
});
(async () => {
try {
await initConnectors();
await initI18n();
await initApp(app);
} catch (error: unknown) {
console.log('Error while initializing app', error);
}
})();