Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

ryotarai/smock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smock

Slack mock

Installation

$ go get -u github.com/ryotarai/smock

Usage with Bolt

First, make Slack API URL configurable:

let config = {
  token: process.env.SLACK_BOT_TOKEN,
  signingSecret: process.env.SLACK_SIGNING_SECRET,
};

if (process.env.SLACK_API_URL !== undefined) {
  config.clientOptions = {
    slackApiUrl: process.env.SLACK_API_URL,
  };
}

const app = new App(config);

Start Smock and keep it running:

$ smock start --event-url=http://localhost:3000/slack/events --listen=localhost:3100 --external-url=http://localhost:3100
>>> 

Start your Bolt app in another terminal:

$ SLACK_BOT_TOKEN=dummy SLACK_SIGNING_SECRET=dummy SLACK_API_URL=http://localhost:3100/api node app.js

Type your commands or messages to Smock prompt:

>>> /your-slash-command
<<< from your app
>>> your message
<<< from your app

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published