www/src/cli.ts

22 lines
664 B
TypeScript
Raw Normal View History

2022-03-29 12:55:55 +00:00
#!/usr/bin/env -S node --experimental-repl-await
2022-03-31 15:22:41 +00:00
import {globalRegistry, env} from '@extollo/lib'
2022-03-29 12:55:55 +00:00
import {cli} from './bootstrap'
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 = cli()
const limitOverride = env('STACK_TRACE_LIMIT')
if ( limitOverride && !isNaN(limitOverride) ) {
Error.stackTraceLimit = limitOverride
}
await appInstance.run()
2022-03-29 12:55:55 +00:00
})