Skip to content

Where there's smoke, there's fire! Exception handling middleware with flair.

License

Notifications You must be signed in to change notification settings

outpace/smokestack

Repository files navigation

smokestack

Where there's smoke, there's fire!

Usage

Add smokestack to your project.clj as a dependency and use smokestack.middleware.wrap-smokestack when defining your handler.

latest-version

example

lein ring server to run the example

lein test to run the tests

Dev only

I recommend only using smokestack middleware in development mode:

(ns middleware.maybe-dev
  (:require [util.config :as config]
            [smokestack.middleware :as smokestack]
            [middleware.bomb-proof :as bomb-proof]
            [ring.middleware.reload :as ring-reload]))

(defn wrap-maybe-dev
  "pass in the var, not the routes"
  [routes-var]
  (if (#{:dev} config/env)
    (-> routes-var
        ring-reload/wrap-reload
        smokestack/wrap-smokestack)
    (bomb-proof/wrap-bomb-proof @routes-var)))

License

Copyright © 2014 Outpace Systems Inc

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

Where there's smoke, there's fire! Exception handling middleware with flair.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published