slack-local-server
v1.0.2
Published
A mock server that mimics Slack API's `chat.postMessage`. A development support tool that saves messages and allows preview in Block Kit Builder.
Readme
Slack Local Server
A mock server that mimics Slack API's chat.postMessage. A development support tool that saves messages and allows preview in Block Kit Builder.
📦 Installation
npm install slack-local-serverUsing with docker-compose
services:
slack-local-server:
image: yasu1003/slack-local-server:latest
ports:
- "54330:54330"
volumes:
- ./data:/app/data🚀 Usage
Starting the server
npx slack-local-serverThe server will start on http://localhost:54330
Using with @slack/web-api
import { WebClient } from "@slack/web-api";
const web = new WebClient(token, {
slackApiUrl: "http://localhost:54330/api/",
});Viewing messages
Open your browser and go to:
http://localhost:54330You can:
- View all sent messages
- Preview messages in Block Kit Builder format
- Delete individual messages or clear all messages
📋 Requirements
- Node.js 14.0.0 or higher
- npm 6.0.0 or higher
