def serve
import bendonnect-rpc@0.1.0.0/src/transport/server.bend as Serverimport Base
import bend-kit-http@0.36.0.0/http.bend as Http
import bend-kit-http@0.36.0.0/completion.bend as Completion
361# Serves forever on host:port. `prefix` is "" or e.g. "/api". It is a template argument
362# (pass a string literal) because serve.write.on.with takes closed templates.
363def serve(~handle: Call -> IO(Reply), ~prefix: String, host: String, +port: U32) -> IO(Unit):
364 Http.serve.write.on.with(~Job, ~(req => start(~handle, ~prefix, req)), ~write, ~dispose, ~Completion.ignore, host, port, 33554432n)
Uses (12)
Used by (0)
No other definition uses this definition.