-
-
Notifications
You must be signed in to change notification settings - Fork 837
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
bug in newline support? #218
Comments
The way we expand new lines isn't fancy (src) and only has a single test (src). Going back through issues and git history, I'm not sure what the original intended use case was for expanding new lines. #215 has some cert-specific parsing logic that you might be able to use. I would suggest referencing the path to the cert and reading it in yourself in its original format as outlined here. |
Actually I read this already. I searched all of the open and closed issues to see if this was an existing problem before opening. The problem is I already have all of my app's secrets in one place. I'm trying to avoid having several config files that aren't checked into source control. Easier to maintain apps, etc. Especially on a team. |
We solved it this way, with newlines and JSON.parse: in .env:
in server.ts:
And absolutely we want all our config to be outside source control and in a single file, per 12 Factor App. |
Cool 👍 I solved it with a similar approach. I replaced all
A nit, but I think you mean 12 factor app? https://12factor.net Another nit, I couldn't find anything in 12 app about mandating all config being in a single file. That just happens to be a really nice way to keep all the secrets together in one place. |
Yeah, agreed on both counts, corrected typo. Single file is about parsimony, not strict 12 Factor requirement. |
thanks for sharing your solution. The @maxbeatty in the interests of closing/resolving this issue, I'm fine with either of the aforementioned workarounds. Perhaps a PR to explain this semi-common usecase and it's solutions? |
I think this discussion is fine. GitHub issues rank pretty well for Google searches. Writing a more detailed blog post may be best (e.g. "Why and how we use multiple line variables with dotenv") |
here's a snippet from my .env file:
on my osx machine, I'm able to load
RETHINKDB_CA_CERT
as an ssl cert string. However when I deploy this same .env file and code to a linux server, the newlines don't seem to work, and I get a message about it being an invalid cert. It looks like the newlines are possibly being replaced with spaces. straight from the log tail:any ideas?
The text was updated successfully, but these errors were encountered: