Closed aaronsantiago closed 11 months ago
Hi @aaronsantiago,
Thanks for considering using caxa. Perhaps there could be more elegant ways of expressing this idea, but I think that the proper solution to the issue that you bring up really is to make the path relative to the source file, instead of relative to the working directory from which your server was run. This isn’t necessary a concern having to do with caxa—the same issue would arise if you ran your server from a different directory: node path-to-application/index.mjs
.
In any case, I’ve been thinking about the broad strategy employed by caxa and concluded that there is a better way to solve the problem.
It’s a different enough approach that I think it deserves a new name, and it’s part of a bigger toolset that I’m building, which I call Radically Straightforward · Package.
I’m deprecating caxa and archiving this repository. I invite you to continue the conversation in Radically Straightforward’s issues.
Best.
Reading through some other issues on the repo it seems like this should have worked:
However, I am finding that this attempts to serve the public folder in the directory the executable is run from. The workaround I am using for this is incredibly hacky:
This now behaves as I expected and serves the public folder that was packed into the executable.
Is there a more sane way to do this or a way to better understand why express isn't playing nice with caxa?