Skip to content

davidmauskop/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.

About

Deploy a compojure + Clojure server to https://render.com

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Clojure 82.6%
  • Dockerfile 17.4%