Search code examples
javabotframeworkweb-chat

Steps to deploy botbuilder chatbot locally through webchat


I want to build a bot in java using the the microsoft bot builder framework. I am trying out the samples provided here. I would like to know how can I locally deploy a bot developed using botbuilder-java framework on webchat.

I have blindly tried the html listed on another ST link as below

window.WebChat.renderWebChat({
    directLine: window.WebChat.createDirectLine({
        secret: '',
        token: '',
        domain: 'http://localhost:8080/directline',
        webSocket: false // defaults to true
    })})

but that that fails with various errors on console. Kindly guide me on how could I proceed. Note my bot and the web chat clients needs to be deployed locally (not on emulator). No azure deployments.

Thanks.


Solution

  • I figured out that javascript code was incomplete. The complete code is

    window.WebChat.renderWebChat({
            directLine: window.WebChat.createDirectLine({
                secret: '',
                token: '',
                domain: 'http://localhost:7070/directline',
                webSocket: false // defaults to true
            }),
            styleOptions: {
                hideUploadButton: true
            }
        }, document.getElementById('webchat'))