File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,24 @@ mod link;
33mod schedule;
44
55use crate :: schedule:: check_repository_links;
6+ use axum:: { Router , routing:: get} ;
67use std:: time:: Duration ;
78
9+ async fn health_check ( ) -> & ' static str {
10+ "OK"
11+ }
12+
813#[ tokio:: main]
914async fn main ( ) {
15+ let app = Router :: new ( ) . route ( "/check" , get ( health_check) ) ;
16+
17+ let listener = tokio:: net:: TcpListener :: bind ( "localhost:3000" )
18+ . await
19+ . unwrap ( ) ;
20+
1021 let repo_url = "https://github.com/reddevilmidzy/redddy-action" ;
1122 let interval_duration = Duration :: from_secs ( 60 ) ;
12- check_repository_links ( repo_url, interval_duration) . await ;
23+ let _repo_check = check_repository_links ( repo_url, interval_duration) ;
24+
25+ axum:: serve ( listener, app) . await . unwrap ( ) ;
1326}
You can’t perform that action at this time.
0 commit comments