Click here to Skip to main content
15,867,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am looking to host my bot developed with Microsoft bot framework using C # locally, I found this package https://github.com/ryanvolum/offline-directline[^]

What I have tried:

I tried to apply what is mentioned in the documentation, here is what I did.
1-Create a new node project:
JavaScript
const directline = require("offline-directline");
const express = require("express");

const app = express();
directline.initializeRoutes(app, 3000, "

http://localhost:5055/api/messages");

2-Build a bot: I created an echo bot just for testing, and hosted it using iis.

3-Set up your client: in this section, I added an html file, and I created BotChat.App
HTML
<!DOCTYPE html>
<html>
  <head>
    <script
      crossorigin="anonymous"
      src="https://cdn.botframework.com/botframework-webchat/latest/webchat.js"
    ></script>
    <style>
      html,
      body {
         height: 100%;
      }

      body {
        margin: 0;
      }

      #webchat {
        height: 100%;
        width: 100%;
      }
    </style>
  </head>
  <body>
    <div id="webchat" role="main"></div>
    <script>
      window.WebChat.renderWebChat(
        {
          directLine: window.WebChat.createDirectLine({
            secret: '',
            token: '',
            domain: 'http://127.0.0.1:3000/directline',
             webSocket: false // defaults to true
        }),
    })
    </script>
  </body>
</html>



I have two questions The file index. Html, I put it in the same folder of index.js is that correct? If it was yes why when I grab http: // localhost: 8000 / samples / fullwindow /? domain = http: // localhost: 3000 / directLine does not work ??
Posted
Updated 29-Apr-21 3:42am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900