run
Start the HTTP server and begin listening for requests. Uses @hono/node-server
to serve the Hono application with all registered agents. Handles server mode only —
for serverless deployments (AWS Lambda, Google Cloud Functions, Azure Functions),
use ServerlessAdapter instead.
Set SWML_SSL_ENABLED, SWML_SSL_CERT_PATH, and SWML_SSL_KEY_PATH to serve HTTPS;
webhook URLs then use https, on SWML_SSL_DOMAIN when it’s set. When the certificate
or key file is missing, it warns and serves HTTP. See
environment variables.
Parameters
host
Override the configured hostname.
port
Override the configured port.
Returns
Promise<void> — Resolves after starting the HTTP server.
For custom server setups — such as embedding the agents into an existing Hono application —
use getApp() to retrieve the underlying Hono app and pass its fetch handler to
your own @hono/node-server serve() call instead of using run().
When the environment variable SWAIG_CLI_MODE=true is set (used by the swaig-test
CLI tool), run() returns immediately without starting the server so only the agent
configuration is loaded.