Skip to content

envdesk/node-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EnvDesk

One stop solution to Key 🗝 management!
This is the official EnvDesk SDK for javascript.

Getting Started

Create your free account and generate relevant keys at Envdesk. For detailed steps follow this tutorial

Installation

$ npm install envdesk

Usage

Having generating your application access_key and environment

Loading Remote Variables

const Envdesk = require("envdesk")

Envdesk.engine.loadVariables({
  access_key: "[YOUR_ACCESS_KEY]",
  environment: "[YOUR_ENVIRONMENT]", 
  private_key: "[YOUR_ENVIRONMENT_PRIVATE_KEY]"}).then(() => {
    
  // The rest of your startup logic
})

Reading Variables

Automatically once variables are loaded, you can read from your process.env

const value = process.env["KEY"] // or process.env.KEY

Alternatively, you could reference envdesk directly

const value = Envdesk.store["KEY"] // or Envdesk.store.KEY

Referencing Variable data

const variables = Envdesk.variableStore // Variable[]