src/ folder with two different entries:
Can I start a shadow-cljs server to compile both of them?
Currently I’m using two folders like
client/src/server/ with two seperated shadow-cljs servers compiling them. I want to reduce the cost building programs meanwhile share code between two of them.
Of course you can. Just create 2 builds?
shadow-cljs watch client server to start both from the CLI.
Or do it from the REPL.
$ shadow-cljs clj-repl
Good example for an entire project here:
I find shadow-cljs one of the most intuitive pieces of software i have ever encountered … congrats on the design.
watch accepts multiple arguments. Cool.
One more question, does watching server differentiate two programs seperately? Like after editing
client.cljs, will the server part be notified of reloading?
No. One watch does not affect the other. The only thing that matters is what is used in a build. So if you edit
app/client.cljs the server won’t be affected. When you edit
app/shared.cljs it will be when the server actually uses it.
Works as expected after refactoring my workflow by merging two of them into a single project. https://github.com/Cumulo/cumulo-workflow/blob/master/shadow-cljs.edn
Now shadow-cljs is compiling(and maybe reloading) my front-end and back-end code in the meanwhile. Would reduce some tedious works.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.