Solving the problem of too much lines of code for a fresh Azure Functions Bot

Have you ever faced the issue of looking at more than 200.000 lines of code after creating a freshFunctions Bot via theAzure Portal? Well, I have unfortunately and I didn't know where to put my code in this massive amount of NodeJS code. As a lightweight developer, I am not that familiar in reading someone else's code so I didn't want to spend hours in studying the code below in order to get an idea where to put my code into. But I found a solution to this problem which you'll see below.

Functions Bot too much lines of code

But then I started debugging. Well, not the code but the Azure Portal ;) And after a while, I found the solution to my problem. Looking at the navigation pane to the right in the portal you can view the solution's files. And when you create a bot via the Azure Portal with a NodeJS template it usually comes with the following files:

Functions Bot solution's files

Now if you click on the index.js file which is apparently already open it gets reloaded in the portal and somehow the 200.000 lines of meaningless (at least to me meaningless) code transform into 42 lines of meaningful code, isn't that awesome? ;)

Solution for solving the underlying problem

So now you should be able to start adding more lines of code in there to actually develop your bot's logic… Happy coding! If you still face this issue feel free to get in touch with me…

Author's picture

Stephan Bisser


All about Conversational AI

Ask my bot anything: