Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

MicrosoftDX/progressive-web-bot

 
 

Repository files navigation

[Archived] Webchat with Push notifications

This code has been set in an archived state as it has not been modified for over 4 years and has noone supporting its future development. It is also likely that this project will not compile with the current BOT Framework libraries.

This is a sample of code which shows how you can enable push notifications on a web chat connected to the Microsoft Bot Framework. It is using service workers and Progressive Web Apps features.

How to try the sample

  • clone this repository
  • run npm install from command line
  • run it with node bot.js. It will generate the vapidKey.json file
  • copy the public key in the vapidKey.json and paste it in the VAPID_PUBLICKEY constant
  • create a public https instance of the bot by
    • deploying it online
    • making is publicly available from your computer using a tool like ngrok
    • modify the baseurl variable in the service-worker.js file with your public base url (https://something.xyz)
  • create a bot at http://dev.botframework.com using this public endpoint
  • create environment variable to set your bot MICROSOFT_APP_ID and MICROSOFT_APP_PASSWORD secret keys
  • activate the direct line channel on your bot and copy the key it gives you in the DIRECTLINE_SECRET constant in the index.js file
  • redeploy if needed

You can now browse https://something.xyz/web/index.html and talk to the bot ! :)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 45.4%
  • C# 23.2%
  • TypeScript 15.5%
  • CSS 15.2%
  • HTML 0.7%