首页 > 移动平台 > 详细

[NodeJS] Use Secrets When Deploying Applications with Now

时间:2016-10-03 00:20:11      阅读:310      评论:0      收藏:0      [点我收藏+]

Applications require a lot of sensitive information. Database passwords, API keys and secrets used for signing JWTs, just to name a few. If you‘re deploying your application using the Now CLI, you can deploy your secret information right through the CLI and give your code access to those secrets without exposing them directly in your source code. In this lesson, we‘ll cover how to add secrets to now, how to use a secret as the value of an environment variable and how to list and remove secrets in now.

 

// Create a secret
now secrets add super-secret-message "Mr. Bond"

// List Secrets
now secrets ls

// Deploy and Assign Secret to Environment Variable
now -f -e GREETING=@super-secret-message

// Remove Secret
now secrets rm super-secret-message

// Deploy with Standard Environment Variable Value
now -f -e GREETING=Eggheads

// Remove Deployment with Secret
now rm <DEPLOYMENT ID>

 

[NodeJS] Use Secrets When Deploying Applications with Now

原文:http://www.cnblogs.com/Answer1215/p/5928259.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!