Skip to content

Add Ring Dependencyλ︎

Add the ring library as a dependency of the todo-list project.

Note::Add ring dependencyλ︎

Edit the project.clj file and add [ring "1.8.0"] to the :dependencies section, after the Clojure library dependency.

(defproject todo-list "0.1.0-SNAPSHOT"
  :description "A Todo List server-side webapp using Ring & Compojure"
  :url "https://github.com/practicalli/clojure-todo-list-example"
  :license {:name "Creative Commons Attribution Share-Alike 4.0 International"
            :url  "https://creativecommons.org"}
  :dependencies [[org.clojure/clojure "1.10.1"]
                 [ring "1.8.0"]]
  :repl-options {:init-ns todo-list.core})

Hint::Dependencies with Leiningenλ︎

Read the dependencies section of the Leiningen documentation to learn more about adding libraries.

Looking up Libraries & current versionsλ︎

Libraries created by the Clojure community can be found on Clojars.org, an online repository similar to Maven Central.

Use the Clojars.org website to search for the latest version of Ring.

Clojars.org ring dependency

The dependency notation for Leiningen is documented for each library, making it easy to add the library to your project.