First install Bolt and make it work. Then use
npm and install it:
npm install --save bolt-remote
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:
// some other config// .// .remote:server:hostname: '127.0.0.1'port: 3000auth: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
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
keyparam in query string.
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.
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.