0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00
logto/packages/core/src/index.ts
Gao Sun 08bea22195
chore(deps): upgrade packages (#1738)
* chore(deps): upgrade packages

* refactor: update per lint report

* chore(deps): upgrade configs

* fix(ui): lint rules compatibility

* chore: remove unused override

* chore(deps): upgrade jest config
2022-08-05 05:58:31 +00:00

31 lines
772 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 */
// Update after we migrate to ESM
// eslint-disable-next-line unicorn/prefer-top-level-await
(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);
}
})();