bungibindies/bun/http/serve
Types
pub type ServeOptions {
ServeOptions(
development: Option(Bool),
hostname: Option(String),
port: Option(Int),
static_served: Option(Map(String, Response)),
handler: fn(Request) -> Promise(Response),
id: Option(String),
reuse_port: Option(Bool),
)
}
Constructors
-
ServeOptions( development: Option(Bool), hostname: Option(String), port: Option(Int), static_served: Option(Map(String, Response)), handler: fn(Request) -> Promise(Response), id: Option(String), reuse_port: Option(Bool), )
Arguments
-
hostname
The hostname to listen on.
-
port
The port to listen on.
-
static_served
Server static Response objects by route.
-
handler
Handle dynamic requests.
-
id
Uniquely identify a server instance with an ID
-
reuse_port
Whether to reuse the port or not.
-