[NodeJS] Use Secrets When Deploying Applications with Now

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[NodeJS] Use Secrets When Deploying Applications with Now相关的知识,希望对你有一定的参考价值。

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 [email protected]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的主要内容,如果未能解决你的问题,请参考以下文章

nodejs中jQuery.when()的等价物是啥?

When to use next() and return next() in Node.js

System Design Interviews: NoSQL Databases and When to Use Them.

007:When to use LinkedList over ArrayList?

When to Use Nested Classes, Local Classes, Anonymous Classes, and Lambda Expressions

A Sample To use Update, InnerJoin, When/Case, Exists in SQL Server