Skip to Content

http

The http configuration object allows you to customize the network interface and port that the Hive Router listens on for incoming GraphQL requests.

Options

host

  • Type: string
  • Default: "0.0.0.0"
  • Environment Variable: HOST

The host property specifies the IP address to which the router’s HTTP server will bind.

  • "0.0.0.0": Binds to all available network interfaces. This is the standard for services running inside containers.
  • "127.0.0.1" or "localhost": Binds only to the local loopback interface, meaning the router will only be accessible from the same machine.

port

  • Type: integer
  • Default: 4000
  • Environment Variable: PORT

The port property specifies the network port that the router will listen on. Ensure this port is not already in use by another service on the same host. When running in a container, this is the port you will need to expose.

graphql_endpoint

  • Type: string
  • Default: /graphql

The graphql_endpoint property specifies the URL path at which the router will expose its GraphQL API.

You may also use /graphql/{wildcard} if you wish to capture nested paths within the same request, or /graphql/{tail}* to capture any remaining path segments.

Example

This example configures the router to listen only on the localhost interface on port 8080 and on path /my_graphql_router, so it will accept GraphQL requests on http://127.0.0.1:8080/my_graphql_router.

router.config.yaml
http: host: '127.0.0.1' port: 8080 graphql_endpoint: /my_graphql_router
Last updated on