MCPcopy Create free account
hub / github.com/MagicCube/agentara / start

Method start

src/server/server.ts:81–96  ·  view source on GitHub ↗

* Start listening on the configured host and port. * * Uses `AGENTARA_SERVICE_PORT` (default 1984) and * `AGENTARA_SERVICE_HOST` (default 0.0.0.0).

()

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected