Giter Club home page Giter Club logo

webchat-in-development's Introduction

Web Chat in Development

Web Chat in Development is designed to be a simple set-up-and-go implementation of BotFramework-WebChat allowing the developer, with minimal effort, to run a development instance of Web Chat without requiring deployment. The components contained within include a webchat.html page as well as two servers: tokenServer.js and webServer.js.

Requirements

Setting up

  • Clone this repo and run npm i in the root directory
  • Update the .env file with:
    • Your Direct Line secret, which can be obtained by adding the Direct Line channel in your bot's Channels blade in Azure. Copy the key supplied there.
    • The port to use for the token server.
    • The path to be used as the web server's root directory.
      • For example, if you choose your Documents folder, C:\Users\<<UserName>>\Documents, as your root directory, the web server will display the contents of that folder as the topmost viewable directory. Every file, directory, and sub-directory within the Documents folder will also be available. However, no parent directory will be accessible.
    • The port to use for the web server.

Running Web Chat in Development

  • Start your bot locally on your machine
  • Start up ngrok, Azure Service Bus Relay, or equivalent, to create a tunnel
    • The port defined here should match the port used to run your bot
    • Update the bot registration's messaging endpoint with the generated endpoint (ngrok example: https://j8dhs7elw.ngrok.io/api/messages)
  • Type npm run watch to run both servers concurrently
  • Navigate to http://localhost:<<WEB SERVER PORT>> to test your bot and/or Web Chat

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.