fix: automatically open browser when starting only if in dev env

This commit is contained in:
jelveh 2024-11-22 07:11:05 -08:00
parent 70096a8d6f
commit f500fb4706

View File

@ -127,14 +127,16 @@ class WebServerService extends BaseService {
const url = config.origin;
// Open the browser to the URL
// Open the browser to the URL of Puter
// (if we are in development mode only)
if(config.env === 'dev') {
try{
const openModule = await import('open');
openModule.default(url);
}catch(e){
console.log('Error opening browser', e);
}
}
this.startup_widget = () => {
const link = `\x1B[34;1m${osclink(url)}\x1B[0m`;