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() {
2424 eprintln ! ( "Defaulting to loading from `results.db`" ) ;
2525 String :: from ( "results.db" )
2626 } ) ;
27+ let port = env:: var ( "PORT" )
28+ . ok ( )
29+ . and_then ( |x| x. parse ( ) . ok ( ) )
30+ . unwrap_or ( 2346 ) ;
2731 let fut = tokio:: task:: spawn_blocking ( move || {
2832 tokio:: task:: spawn ( async move {
2933 let res = Arc :: new ( load:: SiteCtxt :: from_db_url ( & db_url) . await . unwrap ( ) ) ;
@@ -38,17 +42,13 @@ async fn main() {
3842 "Loading complete; {} commits and {} artifacts" ,
3943 commits, artifacts,
4044 ) ;
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 ) ;
4246 // Spawn off a task to post the results of any commit results that we
4347 // are now aware of.
4448 site:: github:: post_finished ( & res) . await ;
4549 } )
4650 } )
4751 . fuse ( ) ;
48- let port = env:: var ( "PORT" )
49- . ok ( )
50- . and_then ( |x| x. parse ( ) . ok ( ) )
51- . unwrap_or ( 2346 ) ;
5252 println ! ( "Starting server with port={:?}" , port) ;
5353
5454 let server = site:: server:: start ( ctxt, port) . fuse ( ) ;
You can’t perform that action at this time.
0 commit comments