File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-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,13 @@ 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 ! ( "View the results in a web browser at 'http://localhost:{} /compare.html'" , port ) ;
42
46
// Spawn off a task to post the results of any commit results that we
43
47
// are now aware of.
44
48
site:: github:: post_finished ( & res) . await ;
45
49
} )
46
50
} )
47
51
. fuse ( ) ;
48
- let port = env:: var ( "PORT" )
49
- . ok ( )
50
- . and_then ( |x| x. parse ( ) . ok ( ) )
51
- . unwrap_or ( 2346 ) ;
52
52
println ! ( "Starting server with port={:?}" , port) ;
53
53
54
54
let server = site:: server:: start ( ctxt, port) . fuse ( ) ;
You can’t perform that action at this time.
0 commit comments