Hi all! I have a problem. Leiningen runs my application instead of REPL.
project.clj:
(defproject patients "0.1.0-SNAPSHOT"
:description "Test app"
:url ""
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0"]
[ring/ring-core "1.9.5"]
[ring/ring-jetty-adapter "1.9.5"]
[compojure "1.7.0"]]
:main patients.app
:profiles {:dev {:plugins []
:dependencies []
:source-paths ["dev"]}})
src/patients/app.clj:
(ns patients.app)
(require '[ring.adapter.jetty :refer [run-jetty]])
(require '[compojure.core :refer [GET ANY defroutes]])
(defn page-index [request]
{:status 200
:headers {"content-type" "text/plain"}
:body "Application index!"})
(defn page-404 []
{:status 404
:headers {"content-type" "text/plain"}
:body "Page not found."})
(defroutes app
(GET "/" request (page-index request))
(ANY "/ping" _ {:status 200 :headers {"content-type" "text/plain"} :body "pong"})
page-404)
(run-jetty app {:port 8080 :join? true})
Terminal output:
lania-kea@lania-kea-macbook-pro patients % (main)
â–¸ lein --version
Leiningen 2.9.9 on Java 11.0.13 OpenJDK 64-Bit Server VM
lania-kea@lania-kea-macbook-pro patients % (main)
â–¸ lein repl
2022-08-10 19:13:23.958:INFO::main: Logging initialized @5437ms to org.eclipse.jetty.util.log.StdErrLog
2022-08-10 19:13:25.549:INFO:oejs.Server:main: jetty-9.4.44.v20210927; built: 2021-09-27T23:02:44.612Z; git: 8da83308eeca865e495e53ef315a249d63ba9332; jvm 11.0.13+8
2022-08-10 19:13:25.598:INFO:oejs.AbstractConnector:main: Started ServerConnector@71f437d7{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2022-08-10 19:13:25.602:INFO:oejs.Server:main: Started @7081ms
REPL server launch timed out.
Server works well, all routes and 404 page are correctly available in browser. But I need REPL.
Please help, because I can’t go on my education process =(