Hi everyone, 👆
the example i have mentioned is https://github.com/metosin/reitit/tree/master/examples/pedestal-swagger
How can this simple example be improved to add better handling of invalid inputs?
Hi, I’m setting up reitit with re-frame, basically following this example: https://github.com/metosin/reitit/blob/master/examples/frontend-re-frame/src/cljs/frontend_re_frame/core.cljs
I’ve also setup the backend to serve index.html
on all relevant matches. Navigating on the frontend side of things seems to work correctly, but how can I get it so that the frontend routing triggers when a user refreshes the page?
Hi @jlmr! As far as I know it should just work. If you’re on http://localhost:3449/#/sub-page2 and refresh, it should print out to console > initializing routes > Entering sub-page 2
Or did you expect something else? 😮
You said you’re returning index.html
on all relevant matches. Can you confirm that it’s actually returning index.html
with the route you’re requesting?
Are you trying with or without #
in the url?
@valtteri can you help about my issue 🙂 ?
Sorry @abdullahibra I don’t know Pedestal. 😕 But with a quick look it looks like you may have a bad version of Jackson pulled in and that might cause the 500 errors you’re seeing?
(I remember vaguely that I had to pin Jackson dependencies to certain versions at some point but I thought this was fixed a long time ago…)
I might be completely wrong also.
i just tried the example at https://github.com/metosin/reitit/tree/master/examples/pedestal-swagger
@valtteri thank you
I can give it a try…
sure
for math post, just change x to string
Yeah, it gives the nasty 500
it's working fine with http-swagger example, https://github.com/metosin/reitit/tree/master/examples/http-swagger
When I run lein deps :tree | grep jackson
I can see that some jackson deps have different version
[com.fasterxml.jackson.dataformat/jackson-dataformat-cbor "2.9.0"]
[com.fasterxml.jackson.dataformat/jackson-dataformat-smile "2.9.0"]
[com.fasterxml.jackson.core/jackson-core "2.11.0"]
[com.fasterxml.jackson.core/jackson-databind "2.11.0"]
[com.fasterxml.jackson.core/jackson-annotations "2.11.0"]
[com.fasterxml.jackson.datatype/jackson-datatype-jsr310 "2.11.0"]
This might cause issues
But dunno.. I need to run now, but hope you get it fixed!
Thank you 🙂
@valtteri Thanks! I’m trying without the # and so far it doesn’t work unfortunately