Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment-based configuration of DeriveClient #22

Merged
merged 11 commits into from
Aug 9, 2021

Conversation

forkedcancel
Copy link
Contributor

An attempt at partially(?) resolving #9.

I used shocon to handle dev and prod application.conf files on the scalajs side. I'm not sure this is the best way of making both ./deploy.sh and zio-app dev send requests to their respective intended backends, but it works, and lets me push a client and server that reside on different (sub)domains.

There are no changes to the backend route generation - being able to push the frontend to firebase and the backend to heroku/dokku was all I was trying to accomplish, hence 'partially.'

@forkedcancel forkedcancel marked this pull request as ready for review August 8, 2021 03:37
@kitlangton
Copy link
Owner

Wow! That's amazing 😄 Thanks so much for doing this.

I think there's some first-class CORS support for zio-http, but I can muck with that in a follow-up commit. I think I'd prefer some means of code-config over HOCON files—however, this works and fits with a framework paradigm. I may investigate that further in some later PRs, but this gets the job done and makes a lot of sense. Once again, thanks so much!

@kitlangton kitlangton merged commit d14cf08 into kitlangton:master Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants