Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what does start_server in the example? #2

Open
jorgecarleitao opened this issue May 2, 2022 · 0 comments
Open

what does start_server in the example? #2

jorgecarleitao opened this issue May 2, 2022 · 0 comments

Comments

@jorgecarleitao
Copy link

Thanks for this little gem. I am still trying to write a test. Could you share what start_server looks like? I currently have

async fn start_server() -> JoinHandle<()> {
    let grpc_service = tonic::transport::Server::builder()
        .add_service(create_grpc_service())
        .into_service();

    let addr = SocketAddr::from(([127, 0, 0, 1], 3000));
    tracing::debug!("listening on {}", addr);

    tokio::spawn(async move {
        tonic::transport::Server::builder()
            .add_service(create_grpc_service())
            .serve(addr)
            .await;
    })
}

but I think that I need something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant