www/src/index.ts

30 lines
750 B
TypeScript
Raw Normal View History

2022-03-31 15:22:41 +00:00
import {globalRegistry, env} from '@extollo/lib'
2022-03-29 12:55:55 +00:00
import {app} from './bootstrap'
2022-03-31 15:22:41 +00:00
global.Error.stackTraceLimit = Infinity
2022-03-29 12:55:55 +00:00
globalRegistry.run(async () => {
/*
* The Application
* -----------------------------------------------------
* The application instance is a global inversion of control container that
* ties your entire application together. The app container manages services
* and lifecycle.
*/
2022-03-31 15:22:41 +00:00
const appInstance = app()
const limitOverride = env('STACK_TRACE_LIMIT')
if ( limitOverride && !isNaN(limitOverride) ) {
Error.stackTraceLimit = limitOverride
}
Error.stackTraceLimit = 50
await appInstance.run()
setTimeout(() => {
process.exit(0)
}, 3000)
2022-03-29 12:55:55 +00:00
})