Slackbox.Demo (Slackbox v0.1.0)

Copy Markdown View Source

A one-command demo server for the fake-Slack dev UI.

Slackbox.Demo.start/1 boots a self-contained supervision tree (PubSub, the in-memory Slackbox.Store, and a Phoenix endpoint serving Slackbox.DashboardLive), seeds a few messages, and prints the URL. Push more messages live from IEx with Slackbox.Demo.post/2 and watch them appear.

Summary

Functions

Build a plain-text message to channel and store it (appears live in the UI).

Start the demo server. Options: :port (default 4000).

Functions

post(text, channel \\ "#alerts")

@spec post(String.t(), String.t()) :: %{ts: String.t(), channel: String.t() | nil}

Build a plain-text message to channel and store it (appears live in the UI).

start(opts \\ [])

@spec start(keyword()) :: {:ok, pid()} | {:error, term()}

Start the demo server. Options: :port (default 4000).

Returns {:ok, supervisor_pid}.