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

25 lines
503 B
TypeScript
Raw Normal View History

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