Fork me on GitHub
#pedestal
<
2020-11-09
>
souenzzo15:11:22

If you prefer a "HTML file": - Be sure that resources is in your :paths on deps.edn - Add a ::http/resource-path "public" (do not remove file-path !!! ) - create resources/public/index.html with your HTML - You will not need my-spa handler function nor routes change - Connect to localhost:8080/index.html

lispers-anonymous17:11:47

Does anyone know why it's necessary to use a var to reference your routes when setting up pedestal in order for changes to the routes to be picked up properly? Example of var being used here: https://github.com/pedestal/samples/blob/caaf04afe255586f8f4e1235deeb0c1904179355/auto-reload-server/dev/dev.clj#L12

isak19:11:07

@dannyfreeman because otherwise, the current value of the routes gets baked into the service-map

👍 3