Novice Prime Minister

    This package has been deprecated

    Author message:

    renamed to dude-remote

    bolt-remote

    0.2.10 • Public • Published

    bolt-remote

    bolt-remote is a remote http server plugin for Bolt slack bot based on Express web framework. You can use this plugin to make awesome plugins and access your bots remotely with http requests.

    Installation

    First install Bolt and make it work. Then use npm and install it:

    npm install --save bolt-remote

    Setup

    Bolt knows the plugins by their package name prefix. It's loading all bolt-* modules as plugin and pass them a Bolt instance. They can modify the bot or do anything else with the instance.

    This plugin only needs some configuration in your Bolt config.js file. Make sure you have the following config structure in your bot config:

    export default {
      // some other config
      // .
      // .
      remote: {
        server: {
          hostname: '127.0.0.1',
          port: 3000
        },
        auth: {
          key: 'token',
          value: 'DmO6HEvdga5OEva8CxEAZs30C5j7DPhN'
        }
      }
      // maybe some more other config here too
      // .
      // .
    }
    • server: The config object has 2 keys, hostname and the port. The default value is 127.0.0.7 and 3000.

    • auth: Auth configuration which used to implement a simple query string token based auth with following props:

      • key (string): Query string key for auth token string.
      • value (string): Our uniques and safe token to passed as value of key param in query string.

    Usage

    This plugin adds a remote property to your bolt instance. This remote property is a Express server instance which can be used to define routes, middlewares and etc.

    Read more about Express.

    Contribution

    You can fork the repository, improve or fix some part of it and then send the pull requests back if you want to see them here. I really appreciate that. ❤️

    Remember to lint your code before sending pull requests. Run the Grunt eslint task with the following command and fix the lint errors if you get any.

    grunt eslint

    Install

    npm i bolt-remote

    DownloadsWeekly Downloads

    3

    Version

    0.2.10

    License

    MIT

    Last publish

    Collaborators

    • mamal72