0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-23 20:33:16 -05:00
logto/packages/core/src/index.ts
renovate[bot] 3316bbf429
chore(deps): update dependency @silverhand/eslint-config to ^0.14.0 (#866)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 10:42:15 +00:00

29 lines
679 B
TypeScript

import 'module-alias/register';
import Koa from 'koa';
// eslint-disable-next-line import/order
import { configDotEnv } from './env-set/dot-env';
configDotEnv();
/* eslint-disable import/first */
import initApp from './app/init';
import { initConnectors } from './connectors';
import envSet from './env-set';
import initI18n from './i18n/init';
/* eslint-enable import/first */
(async () => {
try {
await envSet.load();
const app = new Koa({
proxy: envSet.values.trustProxyHeader,
});
await initConnectors();
await initI18n();
await initApp(app);
} catch (error: unknown) {
console.log('Error while initializing app', error);
}
})();