Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make so converting to no SSR is more obvious #12

Open
chrismurrph opened this issue Aug 18, 2018 · 0 comments
Open

Make so converting to no SSR is more obvious #12

chrismurrph opened this issue Aug 18, 2018 · 0 comments

Comments

@chrismurrph
Copy link

Can I do a PR that changes the source code comment for wrap-server-side-rendering from "...remove this component.." to "..replace this component with wrap-valid-routes.."?
Where:

(defn wrap-valid-routes [handler]
  (fn [req]
    (let [uri (:uri req)
          bidi-match (bidi/match-route routing/app-routes uri)
          valid-page? (boolean bidi-match)]
      (if valid-page?
        (handler (assoc req :uri "/index.html"))
        (handler req)))))

This extra step you mentioned on slack was not obvious to me, and I assume there will be lots of people who want this URI routing but don't need SSR. I could put an index.html in resource/public as well, although my thinking is not to, just to make it obvious that it is not needed for what is primarily a SSR demo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant