Keeping API keys and access details for the database secure

谁说胖子不能爱 提交于 2019-12-03 21:19:58

Usually what I do is store my configuration in a config.json, add it to my .gitignore, and then include a .npmignore so that npm doesn't use the .gitignore to decide what to bundle. That way, git doesn't add the config.json yet jitsu bundles it on deploy.

env variables, as booyaa suggested, will also work.

You could store the API keys (and other secrets) as environmental variables using jitsu env command. Then use process.env to grab these variables within your node.js app.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!