diff --git a/.forgejo/workflows/node.yaml b/.forgejo/workflows/node.yaml index 9f2891c7c..c7d6ef6ad 100644 --- a/.forgejo/workflows/node.yaml +++ b/.forgejo/workflows/node.yaml @@ -43,7 +43,9 @@ jobs: rm -rf packages/default.gbui/node_modules - name: Kill previous Node.js process (if running) - run: pkill -f "node dist/src/app.js" || true # Ignore if process doesn't exist + run: | + pkill -f "node dist/src/app.js" || true # Ignore if process doesn't exist - name: Start Node.js in background (and persist after workflow) - run: nohup node dist/src/app.js > /dev/null 2>&1 & \ No newline at end of file + run: | + nohup npm run start > /dev/null 2>&1 & \ No newline at end of file diff --git a/packages/core.gbapp/services/GBMinService.ts b/packages/core.gbapp/services/GBMinService.ts index 7d334c8da..81084bf6e 100644 --- a/packages/core.gbapp/services/GBMinService.ts +++ b/packages/core.gbapp/services/GBMinService.ts @@ -803,8 +803,13 @@ export class GBMinService { : GBConfigService.get('MARKETPLACE_SECRET') }; if (GBConfigService.get('GB_MODE') !== 'legacy') { + + const url = + process.env.BOT_URL || + `http://localhost:${GBConfigService.get('PORT')}`; + startRouter(GBServer.globals.server, instance.botId); - config['clientOptions'] = { baseUri: `http://localhost:${GBConfigService.get('PORT')}` }; + config['clientOptions'] = { baseUri: url }; } const adapter = new BotFrameworkAdapter(config);