Skip to content

Instantly share code, notes, and snippets.

@Deraen
Created March 12, 2015 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Deraen/0d37fdcbf98f3d9056e6 to your computer and use it in GitHub Desktop.
Save Deraen/0d37fdcbf98f3d9056e6 to your computer and use it in GitHub Desktop.
Compojure api middlewares
(defapi app
(swagger-ui "/api-docs")
(swagger-docs)
(context "/js" []
(middlewares [(caching/cache-middleware caching/cache-30d)]
(resources "" {:root "public/js"})))
(context "/images" []
(middlewares [(caching/cache-middleware caching/cache-30d)]
(resources "" {:root "public/images"})))
...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment