* Start listening on the configured host and port. * * Uses `AGENTARA_SERVICE_PORT` (default 1984) and * `AGENTARA_SERVICE_HOST` (default 0.0.0.0).
()
| 79 | * `AGENTARA_SERVICE_HOST` (default 0.0.0.0). |
| 80 | */ |
| 81 | async start(): Promise<void> { |
| 82 | const port = parseInt(Bun.env.AGENTARA_SERVICE_PORT ?? "1984", 10); |
| 83 | const hostname = Bun.env.AGENTARA_SERVICE_HOST ?? "0.0.0.0"; |
| 84 | |
| 85 | this._server = Bun.serve({ |
| 86 | fetch: this._app.fetch, |
| 87 | port, |
| 88 | hostname, |
| 89 | }); |
| 90 | |
| 91 | this._logger.info( |
| 92 | "HTTP server is running on http://" + |
| 93 | hostname + |
| 94 | (port === 80 ? "" : ":" + port), |
| 95 | ); |
| 96 | } |
| 97 | |
| 98 | /** |
| 99 | * Gracefully shut down the server. |
nothing calls this directly
no outgoing calls
no test coverage detected