Fork me on GitHub

Any pointers how to configure nginx to serve static index.html reagent app with router?


I think that's a totally separate concern, not reagent specific 🙂


afaik, you just put the js output compiled from cljs to that webserver, and that's it


I have a virtua host on nginx that points to that index.html and when I click a link on reagent app that directs to it works great. But when I open new browser window and enter I get 404


ahhh, I think going there directly is the problem because it's looking for a file or folder named room and where js is isn't really involved


@artur, you need to change you nginx configuration to handle all requests for /*, e.g. /room, with index.html


that's really an nginx question 🙂


Actually I had to do the following: location / { try_files $uri /index.html; } I know it is an nginx issue but I think this is quite related to reagent since docs mostly talk about running the server version of reagent.


But I managed to maek it work, thank you for your time 🙂


what is the "server version of reagent"?


naming is hard 😄 suggestion on how to call a namespace that includes functions that accept the app-state and return things? state.clj is ugly


@richiardiandrea Agreed, naming is definitely hard 😆 What kind of stuff is it returning?


let's say I have resources in the state and I need to index them, I will a get-indexed-resources function


I have a bunch of them and it is becoming unwieldy, in re-frame I'd call it db.clj probably


Ahh gotcha, yeah, i see why naming it is murky. I have a file called model.cljs with my app-state, and another file called cursors.cljs with my cursors, but i dont do any kind of processing there like indexing, so cant draw on experience to help. Hopefully someone else will chime in with a good name :)