Theia API Documentation v1.77.0
    Preparing search index...

    The main entry point for Theia applications.

    Index
    app: Application = ...
    earlyMiddleware: EarlyExpressMiddleware
    logger: ILogger
    processUtils: ProcessUtils
    rootContainer: Container
    stopwatch: Stopwatch
    • Performs an asynchronous shutdown of the backend in two phases:

      1. Contributions' onStop hooks are dispatched in parallel and awaited so that they can still resolve services from the root Inversify container while it is bound.
      2. All services in the root container are unbound, running their @preDestroy hooks.

      Each phase has its own SHUTDOWN_TIMEOUT_MS budget to avoid hanging on a misbehaving hook. Late-resolving promises from a timed-out phase may still settle in the background and could log noisily or interact with a partly unbound container; this is accepted because the process is exiting.

      Child processes that are still running after both phases are then killed, see ProcessUtils.terminateChildProcessTrees, while the event loop is still available, so that the process.on('exit') handler does not have to do it synchronously.

      Idempotent: a second invocation is a no-op. Exits the process with code 1, so the process.on('exit') handler runs; it does not re-invoke contribution onStop() hooks that this method already dispatched, nor the termination of child processes.

      Returns Promise<void>

    • Parameters

      • contentType: string
      • req: Request
      • res: Response
      • next: NextFunction

      Returns Promise<void>

    • Parameters

      • Optionalport: number
      • Optionalhostname: string

      Returns Promise<
          | Server<typeof IncomingMessage, typeof ServerResponse>
          | Server<typeof IncomingMessage, typeof ServerResponse>,
      >