Closed rolznz closed 7 months ago
how about we do it as in lndhub and move the main* to a cmd folder?
cmd/http.go
and cmd/wails.go
etc.?
how about we do it as in lndhub and move the main* to a cmd folder?
cmd/http.go
andcmd/wails.go
etc.?
I don't think we can fix this right now without a big app restructure: we need to move everything out of the main package.
Also, I could be wrong but I'm not sure the default Wails build command supports this: https://wails.io/docs/reference/cli#build - we might need to do a manual build.
It seems go build tags are more suited to this usecase (a slight variant of executing the same application).
If we decide to make this change I think it can be done in the future. The build commands will change but everything else should stay the same. Or do you see a problem here that we need to address now?
https://github.com/getAlby/nostr-wallet-connect/pull/222 should be merged first.
This PR removes the app type conditional in the go app by adding two separate entrypoints powered by build tags.
Now the wails app also sets the react app type at build time, so no env variable / .env file is needed.
COOKIE_SECRET is now only checked in the HTTP entrypoint.
The default (HTTP) mode arguments do not change because it uses a NOT WAILS (!wails) build tag.