Popularity
3.6
Stable
Activity
0.0
Stable
7
3
0
Monthly Downloads: 9
Programming language: Shell
License: BSD 3-clause "New" or "Revised" License
Latest version: v0.2.0
wai-slack-middleware alternatives and similar packages
Based on the "wai" category.
Alternatively, view wai-slack-middleware alternatives based on common mentions on social networks and blogs.
-
wai-middleware-static
WAI middleware that intercepts requests to static files and serves them if they exist. -
wai-cli
DISCONTINUED. Command line runner for Wai apps (using Warp) with TLS, CGI, socket activation & graceful shutdown | now on https://codeberg.org/unrelentingtech/wai-cli -
wai-middleware-static-caching
WAI middleware that intercepts requests to static files and serves them if they exist.
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
Promo
coderabbit.ai
Do you think we are missing an alternative of wai-slack-middleware or a related project?
README
wai-slack-middleware
A Slack middleware for wai Used for logging the request information into Slack from a WAI application via middleware.
Usage:
Settings are controlled via the type SlackConfig
:
import Network.HTTP.Types.Status
let slackConfig = SlackConfig {
webHookUrl = "https://hooks.slack.com/services/xxx/xxxxxxxx",
httpManager = appHttpManager foundation,
responseFilter = \resp -> status400 == responseStatus resp,
requestFilter = \_ -> True
}
The above configuration will send slack notification for all 400 http status code.
Integrating with yesod scaffolding templates
Go to Application.hs
and change the function makeApplication
to
something like this:
makeApplication :: App -> IO Application
makeApplication foundation = do
logWare <- makeLogWare foundation
let slackConfig = SlackConfig {
webHookUrl = "https://hooks.slack.com/services/xxxx/xxxxxxx",
httpManager = appHttpManager foundation,
responseFilter = \resp -> status400 == responseStatus resp,
requestFilter = \_ -> True
}
-- Create the WAI application and apply middlewares
appPlain <- toWaiAppPlain foundation
return $ slack slackConfig $ logWare $ defaultMiddlewaresNoLogging appPlain
Ref: