Search code examples
botframeworkmicrosoft-teams

Run Bot and Tabs from Microsoft Teams Toolkit locally at the same time


I used the MS Teams Toolkit extension from within VSCode to generate my Teams app. I want to run it locally while developing, for obvious reasons.

I added a bot and a tab. However, two folders get created, each with their own package.json and associated scripts.

I've followed both READMEs, but as I suspected, you can't seem to run the bot and the tabs at the same time since ngrok does not allow two http tunnels at once. On top of that, I'm getting randomly generated ngrok addresses.

My company has a paid ngrok account so that I can register domains, which I have done already.

How does one go about running the Tabs AND the Bot from this project? And how can I set static ngrok adresses so I don't have to change my bot endpoint on Azure every time?

Thanks!

Note: I have tried using yo teams generator, but the project scaffolding is, to me anyway, atrocious.

enter image description here


Solution

  • It's possible with ngrok, even the free version, to run multiple tunnels at the same time, so you could bind multiple addresses, which is what you need (I do this also a lot when I'm running an app with both a Bot and a Tab). Have a look at the ngrok docs for this over here.