码迷,mamicode.com
首页 > 其他好文 > 详细

[Now] Configure secrets and environment variables with Zeit’s Now

时间:2016-12-17 22:44:07      阅读:133      评论:0      收藏:0      [点我收藏+]

标签:env   format   and   make   database   remove   blog   config   with   

Often your project will require some secret keys or tokens - for instance, API keys or database authentication information. Learn how to safely and easily deploy secrets to now, and how to expose them as environment variables that your applications can load without making them public to the world.

 

Deploy with env variable:

now -e GREETING=Hello
now -e GREETING=Hello -e NAME=Egghead

 

But sometime you might don‘t know the variable be public. You want to make it secret.

now secret add greeting Hello
now secret add name Egghead

 

Then you can make a script to deploy:

now -e GREETING=@greeting -e NAME=@name

 

List your all secrets:

now secrets ls

Remove recret:

now secret remove name

 

[Now] Configure secrets and environment variables with Zeit’s Now

标签:env   format   and   make   database   remove   blog   config   with   

原文地址:http://www.cnblogs.com/Answer1215/p/6193131.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!