feat: make web folder configurable#821
Conversation
| def validate_web_build_exists(project_path): | ||
| web_folder = os.path.join(project_path, 'web') | ||
|
|
||
| def validate_web_build_exists(web_folder): |
There was a problem hiding this comment.
On a closer look, the difference now is that we don't print the whole path. We could use os.path.realpath(web_folder), what do you think?
|
Hey @duesee thanks for your contribution. Can you explain your use case please? |
|
Sorry, yes, sure! From my understanding, the frontend ( For us, it made sense to package it up separately with Nix so that we can refer from any other package to it, it doesn't need to be rebuild when the backend changes, we can quickly patch it if needed, etc. In Nix, however, packages are all put under The other benefit is that it makes testing a little easier since we can quickly change the web source via the parameter. Having said that... if you feel this is introducing complexity that you don't like, we can work around it! But in my opinion the increased flexibility outweights the complexity. |
|
From my perspective, BE and FE are tightly coupled. I cannot imagine a situation when they would be used as standalone modules. May be you can explain Nix structure a bit more. How these 2 separate packages would live side by side. What would be the release cycle and in general how released for Nix would look like.
I don't like having features, which I don't understand :) It's hard to maintain something what you don't know. That's why I'm asking additional questions to learn more about it. |
|
I understand :-) Hm... maybe it makes sense then for me to provide a PR with the required Nix files as a basis for discussion? I could submit a (draft) PR so we have something to look on. (I probably won't use my computer the next days, but will surely submit something next week :-)) |
|
sure, thanks! |
This PR adds a parameter to make the
webfolder configurable. This has a few benefits, one is that we can easily experiment with different web roots. If I didn't overlook something, not using the parameter (which defaults to "web") should keep the current behavior.Note: This PR is mainly based on https://github.com/tfc/script-server.