keyspot
v2.1.0
Published
KeySpot Nodejs API
Downloads
5
Readme
KeySpot
Sign up here
KeySpot is a tool to help manage environment variables for individuals and teams of developers. The service stores environment variables for your project in a centralized place so you don't have to juggle different .env files for your environements and applications. Once you have signed in at keyspot.app, you can create new records, share them with your team, and access them in code.
See our usage tutorial on YouTube.
Installation
$ npm install --save keyspot
Usage
Sign in to KeySpot, and create a record. At the top of each record's page there is an accessKey. Copy the accessKey as you will be using this to access your environment variables in code.
Accessing your environment in code:
const keyspot = require('keyspot');
// secrets are automatically be added to process.env
const secrets = await keyspot('<accessKey>');
Updating your environment in code:
const { update } = require('keyspot');
const newSecrets = {
VAR1: "foo",
VAR2: "bar"
};
await update('<accessKey>', newSecrets);
note: KeySpot also works with ES6:
import keyspot from 'keyspot';
const variables = await keyspot('<accessKey>');
note: You will want to supply your program with your access key as your only environement variable or a command line argument.