0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-20 21:32:31 -05:00
logto/packages/core/src/index.ts

28 lines
611 B
TypeScript
Raw Normal View History

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
dotenv.config();
2022-01-27 19:26:34 +08:00
/* eslint-disable import/first */
2021-08-11 22:37:21 +08:00
import initApp from './app/init';
import { initConnectors } from './connectors';
import { trustingTlsOffloadingProxies } from './env/consts';
2021-08-30 11:30:54 +08:00
import initI18n from './i18n/init';
2022-01-27 19:26:34 +08:00
/* eslint-enable import/first */
2021-06-06 18:30:37 +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 {
await initConnectors();
await initI18n();
await initApp(app);
2021-06-27 20:44:05 +08:00
} catch (error: unknown) {
console.log('Error while initializing app', error);
}
})();