4

my question is about How to deploy Node.js bot to Azure using Visual Studio Code? I have created app service using Visual studio code extension "AZURE APP SERVICE", but it is a website, how to deploy bot code?

2
  • I believe the bot is deployed on to the app service so it can host the bot. Commented Apr 7, 2018 at 2:07
  • 3
    Your node.js bot is nothing different than app, simply deploy it as web-app and it will work. Commented Apr 7, 2018 at 3:27

2 Answers 2

2

Install Azure plugins for Visual Studio and use Command Palette(Ctrl + Shift + P). I think that this is the easiest way.

Find Azure App Service: Deploy To Web App and follow the steps.

This did the job for me, and I can talk to the bot.

Sign up to request clarification or add additional context in comments.

Comments

1

It sounds like you've got a bot set up on your personal machine already, if the website you have generated includes an endpoint

/api/messages

It will function as a bot. If you haven't successfully created a bot on your local machine use the node.js tutorial here

In order to use Azure, access the Azure portal and create a web app bot resource via

'Create a resource' > 'AI + Machine Learning' > Web App Bot

Fill out this form with your bot's name and your subscription and resource group in Azure. Generally, it's good to select locations that are close to your customers. You can select any nodejs template, as it will be overwritten by your first deployment. Wait for your bot to finish generating on Azure portal.

Click on the Azure Tab in visual studio code. There should be a blue arrow that reads "deploy". Click on this and you will be prompted to log in to Azure. After signing in, select the folder that contains your bot, and select your subscription, and then select the Azure portal bot you generated earlier. This will deploy your bot to Azure, and it will be accessible within its blade on your dashboard.

For more info on deployment see the Azure App Service documentation.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.