Skip to content

dmauskop/hello-clojure-compojure

Repository files navigation

hello-clojure-compojure

Deploy a basic server to render.com using Clojure, with compojure and ring.

Deployment

Fork this repo and click the button below.

Deploy to Render

Render automatically redeploys the server when you push changes.

Server logic

The main server logic is defined by this code (found in src/hello_compojure/handler.clj):

(defroutes app
  (GET "/" [] "Hello, world!")
  (GET "/health-check" [] "")
  (route/not-found "Not Found"))

The /health-check endpoint allows Render to execute zero-downtime deploys and to automatically restart your server if it goes down.

Local development

Use lein ring server to run the server locally, with hot reloading set up by default.

References

Acknowledgements

This code was adapted from the Leiningen template for compojure: compojure-template. Many thanks to James Reeves, who wrote much of the most essential code that this project depends on.

Releases

No releases published

Packages

No packages published