My Profile Photo

Manuel Rueda


The passion of develop and try weird things...


Environment variable string encoding

When i started to set up this blog (based in ghost), i put a bunch of sensitive data in environment variables in the heroku configuration.

The problem was a key of google drive API, the content is multi-line and can’t make it work in one line. When i put the new line character in the string \n, this wasn’t interpreted by node.

The only solution that i found for this problem was the next one, convert the string to a buffer and then to string again.

comments powered by Disqus