Coder Social home page Coder Social logo

graph-bot-cli's Introduction

Bot Command Line Interface Console

This application is based on the web-cli-sample-app, so everything you read there regarding enabling the different features is also relevant here. I removed the google authentication and user management features to focus on the bot related scenarios, but you can follow the instructions of how to enable authentication and user management in the web-cli-sample-app page.

Example for the app

Running Locally

git clone https://github.com/catalystcode/graph-bot-cli.git
cd graph-bot-cli
npm install
cd public
bower install

You should define a few environment variables in order for the command line interface to be able to work with you bot:

Copy the file config/dev.sample.json to config/dev.private.json and edit the following values:

To enable communicating with your bot:

BOT_APP_ID- the Microsoft bot Id

BOT_IFRAME_HANDLE- the handle name you provided when registered your bot

BOT_IFRAME_SECRET- the iframe secret from the dev portal- click on get bot embed codes and get it from the web chat

Logging

To enable viewing and querying logs as it appears in the screenshot, you'll need to enable logs by providing the following environment variables:

LOG_STORAGE_ACCOUNT- azure storage account name to use for storing logs

LOG_STORAGE_KEY- the azure storage account key

LOG_LEVEL- one of the following log, info, warn, error

LOG_ENABLED: true or false

In addition to that, you'll need to use the azure-logging node module in your bot code to be able to collect your bot application logs. Follow the code in the server.js file as a reference to enabling collecting logs from your bot service.

Now run:

npm start
Browse to `http://localhost:3000`

Running in the cloud

Make sure you added the environment variables to the app host server

License

MIT

graph-bot-cli's People

Contributors

amiturgman avatar

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.