start

View as MarkdownOpen in Claude

Start the HTTP service. This method blocks until the server is shut down (e.g., via SIGINT). The service exposes search, health check, and index reload endpoints.

Parameters

host
strDefaults to 0.0.0.0

Host address to bind to.

port
Optional[int]

Port to bind to. Defaults to the port set in the constructor.

ssl_cert
Optional[str]

Path to an SSL certificate file for HTTPS. Overrides environment settings.

ssl_key
Optional[str]

Path to an SSL key file for HTTPS. Overrides environment settings.

Returns

None — This method blocks and does not return until the server is stopped.

Example

1from signalwire.search import SearchService
2
3service = SearchService(
4 indexes={"docs": "./docs.swsearch"},
5 basic_auth=("admin", "secret"),
6)
7service.start(port=8001) # Blocks here, serving at http://0.0.0.0:8001/