Deployed bot from local git repository to azure - https://docs.microsoft.com/en-us/bot-framework/deploy-bot-local-git
code :
var restify = require('restify');
var builder = require('botbuilder');
var server = restify.createServer();
server.listen(process.env.port || process.env.PORT || 3978, function () { });
// Create the chat connector for communicating with the Bot Framework Service
var connector = new builder.ChatConnector({
appId: "app-id",
appPassword: "app-password"
});
// Listen for messages from users
server.post('/api/messages', connector.listen());
// Create your bot with a function to receive messages from the user
var bot = new builder.UniversalBot(connector, function (session) {
// echo the user's message
session.send("You said: %s", session.message.text);
});
Getting http 500 errror and message in web chat at https://dev.botframework.com -
There was an error sending this message to your bot: HTTP status code InternalServerError
I can connect to bot from Bot Framework Emulator with localhost url and App Id and password.
Maybe I need to specify that web application is nodejs? I don't see in application settings anything about entry point of app or nodejs option.
EDIT: change "main": "index.js" to "main": "app.js" but still can't send test message.
EDIT2: I add web.config to project (without any changes to suggested code), after that I get message on bot page (http://it-perf-bot.azurewebsites.net/api/messages) - The page cannot be displayed because an internal server error has occurred. Then I added IISnode.yml
loggingEnabled: true
devErrorsEnabled: true
and get this message - http://prntscr.com/gc8vww Log when push bot to azure - http://prntscr.com/gc8wia,
The package.json file does not specify node.js engine version constraints.
I add "engines":{"node": "8.1.4"} to package.json and get
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. My bot - https://github.com/lavandil/skypeBot1.
EDIT3: While making edit2 I tested url http://it-perf-bot.azurewebsites.net/api/messages and get different warning
The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.
Then I test bot at dev.botframework.com and Bot Framework Emulator - everything is working after adding node version to package json. Thanks for replies!