summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 5af58aa0..05d57719 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -34,6 +34,7 @@ impl Authorization for PolicyServer {
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let addr = "[::1]:50051".parse()?;
+ let authorization_service = AuthorizationServer::new(PolicyServer::default());
let (health_reporter, health_service) = tonic_health::server::health_reporter();
health_reporter
.set_serving::<AuthorizationServer<PolicyServer>>()
@@ -44,8 +45,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.build_v1()
.unwrap();
Server::builder()
+ .add_service(authorization_service)
.add_service(health_service)
- .add_service(AuthorizationServer::new(PolicyServer::default()))
.add_service(reflection_service)
.serve(addr)
.await?;