def http.serve_with
ezmcp@0.1.0.0 · src/io.bend:115
import ezmcp@0.1.0.0/src/io.bend as Io
import Base
import emerging-ezjson@1.2.0.0/src/value.bend as Value
import emerging-ezhttp@0.21.0.0/main.bend as Ez
import ezmcp@0.1.0.0/src/rpc.bend as Rpc
import ezmcp@0.1.0.0/src/server.bend as Server
115
116def http.serve_with(
117 ~C: Data,
118 ~run: C -> String -> Value.Json -> IO(Rpc.Out),
119 ~srv: Server.Server,
120 ~path: String,
121 ~origins: List<&2, String>,
122 +ctx: C,
123 host: String,
124 port: U32,
125 limit: U32,
126 +max: U32
127) -> IO(Unit):
128 Ez.http.serve_io_with(~C,
129 ~(c => req => http.answer(C, run, srv, path, origins, c, req)), ctx, host,
130 port, limit, max)