Function poem_lambda::run[][src]

pub async fn run(ep: impl IntoEndpoint) -> Result<(), Error>
Expand description

Starts the AWS Lambda runtime.

Example

use poem::handler;
use poem_lambda::Error;

#[handler]
fn index() -> &'static str {
    "hello"
}

#[tokio::main]
async fn main() -> Result<(), Error> {
    poem_lambda::run(index).await
}