Install Compojure
masterTo use Compojure in your Clojure project, add it as a dependency using either
deps.edn or Leiningen.repository·master·Indexed 26 days ago
https://github.com/weavejester/compojureA lightweight routing library for the Ring web server interface in Clojure that allows developers to build web applications by composing small, independent, and modular routing parts.
deps.edn or Leiningen.Compojure allows you to define a Ring handler by composing routes using defroutes. You can use compojure.core for standard routing and compojure.route for special routes like not-found.
(ns hello-world.core
(:require [compojure.core :refer :all]
[compojure.route :as route]))
(defroutes app
(GET "/" [] "<h1>Hello World</h1>")
(route/not-found "<h1>Page not found</h1>"))