TrimAgency / bot-starter

0 stars 0 forks source link

TRIM SlackBot Starter

A Node Server written in Typescript and designed to get you quickly building Slackbots with Botkit + the Slack adapter.

Prerequisites

  1. Set up A URL for the OAuth redirect you will need once your slack wprkspace and app are set up

    • ngrok is helpful for this
  2. Rename example.env to .env

  3. Set Up Slack

    • In order to get everything set up, you will need to configure a new Slack App inside the Slack Developer Portal. Source [ ] Slack Client Secret [ ] Slack Client ID [ ] OAuth Redirect Url [ ] Interactivity Request URL [ ] Subscribe to Event Subscriptions [ ] message.channels [ ] message.groups [ ] message.im [ ] message.mpim [ ] Add your bot to your Slack team [ ] visit https://BOT_URL/install
  4. Node Version Manager and version 14.1.0

Quick Start

After cloning the project, in your terminal:

  1. Install dependencies $ yarn install

  2. $ dc up. This builds and starts the containers for development.

  3. This app is set up for TDD. To begin, access the server's (node app's) command line:

    • $ docker exec -it server bash
  4. Start the test suite:

    • $ yarn test:watch This will re-run the test suite after every save and produce a coverage report

Testing

Adding Libraries

  1. $ docker exec -it bot-server bash
  2. Install using yarn:
    • > yarn add <lib>
  3. > exit
  4. $ docker-compose down
  5. $ docker-compose up --build