mirror of
https://github.com/logto-io/logto.git
synced 2024-12-23 20:33:16 -05:00
3316bbf429
Co-authored-by: Renovate Bot <bot@renovateapp.com>
29 lines
679 B
TypeScript
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);
|
|
}
|
|
})();
|