src/node/routes/vscode.ts/CodeServerRouteWrapper/ensureCodeServerLoaded
class CodeServerRouteWrapper:  private ensureCodeServerLoaded: express.Handler = async (req, _res, next) => {
    if (this._codeServerMain) {
      // Already loaded...
      return next()
    }

    // Create the server...

    const { args } = req

    // See ../../../lib/vscode/src/vs/server/node/server.main.ts:72.
    const createVSServer = await loadAMDModule<CreateServer>("vs/server/node/server.main", "createServer")

    try {
      this._codeServerMain = await createVSServer(null, {
        ...(await toCodeArgs(args)),
        "without-connection-token": true,
      })
    } catch (error) {
      logError(logger, "CodeServerRouteWrapper", error)
      if (isDevMode) {
        return next(new Error((error instanceof Error ? error.message : error) + " (VS Code may still be compiling)"))
      }
      return next(error)
    }

    return next()
  }