kuhumcst / glossematics

The life of Louis Hjelmslev.
https://glossematics.dk
4 stars 1 forks source link

Build CLJS release in Dockerfile #13

Closed simongray closed 3 years ago

simongray commented 3 years ago

I should include shadow-cljs and compile a release as part of the Dockerfile.

simongray commented 3 years ago

"/" should serve the index.html by default and should be gated behind the login page which can be put at "/login".

simongray commented 3 years ago

This also relates somewhat to https://github.com/kuhumcst/glossematics/issues/12 (caching) since the release index.html should use a fingerprinted filename for the main.js - and the css files too, but I'll get to that at some other time. The most clear way to accomplish this is generating the index.html using Hiccup and serving the correct filename defined in the manifest.edn that shadow-cljs produces.

One complication here is that shadow-cljs itself relies on an actual index.html file, however this can be changed by setting the :handler key to some function taking a request and returning a Ring response map (see: shadow.http.push-state/handle). This handle function should simply return the HTML content created using Hiccup.