run

Function run 

Source
pub fn run(handler: impl Handler)
Expand description

ยงRuns a trillium handler in a sync context

This function creates a new tokio runtime and executes the handler on it for aws lambda.

This function will block the current thread until the server shuts down

Examples found in repository?
examples/aws-lambda.rs (line 2)
1fn main() {
2    trillium_aws_lambda::run(|conn: trillium::Conn| async move { conn.ok("hello!") });
3}