This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ hello-api-clojure git:(master) ✗ lein new pedestal-service hello-api-clojure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lein new pedestal-service hello-api-clojure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lein run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Creating your server... | |
INFO org.eclipse.jetty.server.Server - jetty-9.4.0.v20161208 | |
INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@e7529ac{/,null,AVAILABLE} | |
INFO o.e.jetty.server.AbstractConnector - Started ServerConnector@297c0311{HTTP/1.1,[http/1.1, h2c]}{0.0.0.0:8080} | |
INFO org.eclipse.jetty.server.Server - Started @7735ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn get-json | |
[request] | |
(ring-resp/response {:foo "foo" :list [1 2 3 4]})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Tabular routes | |
(def routes #{["/" :get (conj common-interceptors `home-page)] | |
["/about" :get (conj common-interceptors `about-page)] | |
["/json" :get (conj common-interceptors-json `get-json)]}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def common-interceptors-json [(body-params/body-params) http/json-body]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"foo": "foo", | |
"list": [ | |
1, | |
2, | |
3, | |
4 | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lein new luminus hello-web-app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ hello-web-app git:(master) ✗ lein run | |
2017-08-13 16:37:33,317 [main] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider | |
2017-08-13 16:37:33,706 [main] INFO hello-web-app.env - | |
-=[hello-web-app started successfully using the development profile]=- | |
2017-08-13 16:37:33,831 [main] INFO luminus.http-server - starting HTTP server on port 3000 | |
2017-08-13 16:37:33,899 [main] INFO org.xnio - XNIO version 3.3.6.Final | |
2017-08-13 16:37:34,435 [main] INFO org.projectodd.wunderboss.web.Web - Registered web context / | |
2017-08-13 16:37:34,438 [main] INFO luminus.repl-server - starting nREPL server on port 7000 | |
2017-08-13 16:37:34,461 [main] INFO hello-web-app.core - #'hello-web-app.config/env started | |
2017-08-13 16:37:34,461 [main] INFO hello-web-app.core - #'hello-web-app.handler/init-app started |
OlderNewer