(* * SPDX-FileCopyrightText: 2026 The Forester Project Contributors * * SPDX-License-Identifier: GPL-3.0-or-later *) open Forester_core open Forester_compiler open Forester_frontend module T := Types module EP := Eio.Path module P := Pure_html module H := Pure_html.HTML module Hx := Pure_html.Hx type env := Html_client.env type 'a request = {route: 'a; request: Http.Request.t; body: Cohttp_eio.Body.t} type response = Cohttp_eio.Server.response val serve : env:< net : [> [> `Generic] Eio.Net.ty] Eio.Net.t ; .. > -> route:'a -> port:int -> ('a request -> response) -> unit val respond_string : ?headers:Http.Header.t -> status:Http.Status.t -> body:string -> unit -> response val respond_html : status:Http.Status.t -> Pure_html.node -> response val respond_json : ?status:Http.Status.t -> body:Yojson.Safe.t -> response val theme_dir : env:< fs : ([> Eio__.Fs.dir_ty] as 'a) EP.t ; .. > -> config:Forester_core.Config.t -> 'a EP.t option val mimetype_of_extension : string -> string val mimetype : Router.static -> string val static_handler : env:< fs : [> Eio__.Fs.dir_ty] EP.t ; .. > -> config:Config.t -> Router.static -> response val asset_mimetype : T.asset -> string val respond_asset : T.asset -> response val tree_handler : forest:Forest.t -> request_headers:Http.Header.t -> href:URI.t -> response val respond_tree : forest:Forest.t -> request_headers:Http.Header.t -> Router.Scope.t -> string -> response val not_found : response val query_handler : env:env -> request_headers:Http.Header.t -> response val respond_config : forest:Forest.t -> Http.Header.t -> [> Eio.Flow.source_ty] Eio.Flow.source -> response val respond_index : forest:Forest.t -> request_headers:Http.Header.t -> response val respond_version : forest:Forest.t -> Uri.t -> response val respond_diagnostics : forest:Forest.t -> Uri.t -> response val respond_search : forest:Forest.t -> Uri.t -> response