#Service chaining on registering to App::new()
1 messages · Page 1 of 1 (latest)
async fn main()-> std::io::Result<()> {
HttpServer::new(||{
})
.bind(("127.0.0.1", 8080))?
.run()
.await
}```
This is sample of how I register the endpoints under a given scope
async fn trial()-> impl Responder{
HttpResponse::Ok().body("Hello there")
}
pub fn user_controller()-> Scope{
scope("users")
.service(signup_handler)
.service(trial)
}