Skip to content

Server Configuration

The server section configures the Code Search API server.

server:
addr: ":8080"
read_timeout: 15s
write_timeout: 60s

The address to listen on in host:port format. Use :port to listen on all interfaces.

PropertyValue
Typestring
Default":8080"
EnvironmentCS_SERVER_ADDR

Examples:

  • ":8080" - Listen on port 8080 on all interfaces
  • "0.0.0.0:8080" - Same as above (explicit)
  • "127.0.0.1:8080" - Listen only on localhost
  • ":3000" - Use port 3000

Maximum time to read the entire request, including the body.

PropertyValue
Typeduration
Default15s
EnvironmentCS_SERVER_READ_TIMEOUT

Maximum time to write the response. Should be longer than typical request processing time.

PropertyValue
Typeduration
Default60s
EnvironmentCS_SERVER_WRITE_TIMEOUT

Note: Search requests can take a few seconds on large indexes, so keep write_timeout at 60s or higher.

server:
addr: ":8080"
read_timeout: 15s
write_timeout: 60s
Terminal window
CS_SERVER_ADDR=":8080"
CS_SERVER_READ_TIMEOUT="15s"
CS_SERVER_WRITE_TIMEOUT="60s"

The server exposes these endpoints on the configured address:

EndpointDescription
/api/v1/searchSearch API (POST)
/api/v1/reposRepository management
/api/v1/connectionsConnection management
/api/v1/jobsJob queue management
/api/v1/symbols/definitionsSymbol definitions
/api/v1/symbols/refsSymbol references