File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ async fn main() {
24
24
eprintln ! ( "Defaulting to loading from `results.db`" ) ;
25
25
String :: from ( "results.db" )
26
26
} ) ;
27
+ let port = env:: var ( "PORT" )
28
+ . ok ( )
29
+ . and_then ( |x| x. parse ( ) . ok ( ) )
30
+ . unwrap_or ( 2346 ) ;
27
31
let fut = tokio:: task:: spawn_blocking ( move || {
28
32
tokio:: task:: spawn ( async move {
29
33
let res = Arc :: new ( load:: SiteCtxt :: from_db_url ( & db_url) . await . unwrap ( ) ) ;
@@ -38,17 +42,15 @@ async fn main() {
38
42
"Loading complete; {} commits and {} artifacts" ,
39
43
commits, artifacts,
40
44
) ;
41
- eprintln ! ( "View the results in a web browser at 'http://localhost:2346/compare.html'" ) ;
45
+ eprintln ! (
46
+ "View the results in a web browser at 'http://localhost:{port}/compare.html'"
47
+ ) ;
42
48
// Spawn off a task to post the results of any commit results that we
43
49
// are now aware of.
44
50
site:: github:: post_finished ( & res) . await ;
45
51
} )
46
52
} )
47
53
. fuse ( ) ;
48
- let port = env:: var ( "PORT" )
49
- . ok ( )
50
- . and_then ( |x| x. parse ( ) . ok ( ) )
51
- . unwrap_or ( 2346 ) ;
52
54
println ! ( "Starting server with port={:?}" , port) ;
53
55
54
56
let server = site:: server:: start ( ctxt, port) . fuse ( ) ;
You can’t perform that action at this time.
0 commit comments