This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-01
Channels
- # arachne (3)
- # bangalore-clj (8)
- # beginners (9)
- # cljsrn (3)
- # clojure (148)
- # clojure-filipino (2)
- # clojure-russia (25)
- # clojure-serbia (3)
- # clojure-spec (14)
- # clojure-uk (61)
- # clojureremote (7)
- # clojurescript (38)
- # clojurewest (2)
- # cursive (2)
- # data-science (9)
- # datomic (4)
- # emacs (4)
- # jobs (6)
- # lein-figwheel (3)
- # leiningen (2)
- # off-topic (1)
- # om (3)
- # onyx (1)
- # pedestal (16)
- # perun (2)
- # powderkeg (1)
- # protorepl (2)
- # re-frame (1)
- # reagent (10)
- # spacemacs (2)
- # unrepl (5)
- # untangled (4)
Invalid token: ::http/routes
, which is rather odd. Here's the log and code: http://bit.ly/2oJmQgi
@bradford You should require pedestal with :as http
for the keywords to be pedestal namespaced keywords
OK, new prob. I'm getting no response
(not a 404), when I POST
to localhost:8080/recs
. The code's pretty simple, though... any ideas? http://bit.ly/2olEzOr
@bradford defroutes
is considered deprecated. You should use def
with the tersre route syntaxt as follows:
;; Terse/Vector-based routes
(def routes
`[[["/" {:get home-page}
^:interceptors [(body-params/body-params) http/html-body]
["/about" {:get about-page}]]]])
I recommend using the table syntax instead. See http://pedestal.io/guides/defining-routes#_a_note_about_routing_syntax
One other thing, although the example in the table-syntax reference uses route/expand-routes
, don’t use it in your route definition
Pedestal will expand routes for you on start up if it’s default-interceptors
fn is called. Which is probably in most cases since I suspect that overriding the default interceptors is less common.
I’m going to create an issue in the http://Pedestal.io guides about that
But, you’ll need to explicitly expand routes if you want to create and use a url-for
helper in your tests.
For those interested in auth samples, the geheimtur demo app has been updated to use the latest version of Pedestal. See https://github.com/propan/geheimtur-demo
Geheimtur has also been updated (https://github.com/propan/geheimtur).
@ddeaguiar thanks!