File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -56,14 +56,11 @@ export async function serve(serveDirectory, key) {
5656 port ++
5757 }
5858 }
59- console . log ( `hyperparam server running on http://localhost:${ port } ` )
60- const isDev = process . env . NODE_ENV === 'development'
61- if ( ! isDev ) {
62- if ( ! key ) openUrl ( `http://localhost:${ port } ` )
63- else {
64- key = encodeURIComponent ( key )
65- openUrl ( `http://localhost:${ port } /files?key=${ key } ` )
66- }
59+ const path = key ? `/files?key=${ encodeURIComponent ( key ) } ` : '/'
60+ const url = `http://localhost:${ port } ${ path } `
61+ console . log ( `hyperparam server running on ${ url } ` )
62+ if ( process . env . NODE_ENV !== 'development' ) {
63+ openUrl ( url )
6764 }
6865}
6966
Original file line number Diff line number Diff line change 4343 "test" : " vitest run" ,
4444 "typecheck" : " tsc --noEmit" ,
4545 "url" : " run-p -l watch:ts watch:vite watch:url" ,
46+ "preurl" : " npm run build" ,
4647 "watch:ts" : " tsc --watch" ,
4748 "watch:vite" : " vite build --watch" ,
4849 "watch:serve" : " NODE_ENV=development nodemon bin/cli.js" ,
You can’t perform that action at this time.
0 commit comments