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