run_gateway

Function run_gateway 

Source
pub async fn run_gateway(
    listen: String,
    data_dir: String,
    tls_cert: Option<String>,
    tls_key: Option<String>,
) -> Result<()>
Expand description

Run HTTP gateway server

§Arguments

  • listen - Address and port to listen on
  • data_dir - Data directory containing the IPFRS repository
  • tls_cert - Optional path to TLS certificate file (PEM format)
  • tls_key - Optional path to TLS private key file (PEM format)

§Errors

Returns an error if:

  • Storage configuration is invalid
  • TLS certificate or key files cannot be read
  • Only one of cert/key is provided (both are required for TLS)
  • Gateway fails to start