ores.http.server

Table of Contents

1. Diagram

ores.http.server component diagram

Figure 1: ores.http.server

2. Summary

ores.http.server is the HTTP server process entrypoint for ORE Studio. It reads configuration, opens NATS connections for domain service calls, registers all route handlers from ores.http.core, and starts the Boost.Asio event loop to serve HTTP requests. It is the process external REST clients connect to.

3. Inputs

  • Configuration file: bind address, port, JWT public key, NATS server URL.
  • Incoming TCP connections from external HTTP clients.

4. Outputs

  • A running HTTP/1.1 server on the configured address/port.
  • HTTP responses forwarded from NATS domain services via ores.http.core routes.

5. Entry points

  • src/main.cpp — process entry point.
  • src/app/ — bootstrap and route wiring.
  • src/config/ — configuration parsing.

6. Dependencies

  • ores.http.core — all route implementations.
  • ores.http.api — server infrastructure (Boost.Beast/Asio).
  • ores.logging, nats.c.

7. Build dependencies

What the shared profile cannot know, declared here rather than hand-edited into the generated build file. Each block is spliced into its generated file after the profile's baseline.

8. See also

9. CMake

The key-generation helper the server's manual runbook uses is a script, not a compiled artefact, so it is copied into the runtime directory.

# Copy development scripts to the runtime output directory.
set(ores_http_scripts_dir "${CMAKE_CURRENT_SOURCE_DIR}/../scripts")
file(MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
file(COPY_FILE
    "${ores_http_scripts_dir}/generate_keys.sh"
    "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/generate_keys.sh")
target_link_libraries(${lib_target_name}
    PUBLIC
        ores.http.api.lib
        ores.http.assets.lib
        ores.http.core.lib
        ores.http.iam.lib
        ores.http.refdata.lib
        ores.http.synthetic.lib
        ores.eventing.core.lib
        ores.iam.client.lib
        ores.nats.lib
        ores.service.lib
        ores.telemetry.core.lib
        ores.utility.lib
        ores.database.lib)

Emacs 29.3 (Org mode 9.6.15)