Skip to content

Set node process environment variables based on a secure note stored in the OS X keychain.

License

Notifications You must be signed in to change notification settings

meantime/keychain-env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

keychain-env

Set node process environment variables based on a secure note stored in the OS X keychain.

The contents of the note, or your template file, must be in the format expected by the dotenv package.

Example

const { setEnvFromNote } = require('keychain-env');
const path = require('path');

const options = {
  //  Ounce of prevention, pound of cure and all that.
  timeout: 3000,

  //  If this is our first time running and there is no note in
  //  the keychain yet then read a file from disk full of placeholder
  //  values and write that to the keychain so we know what values
  //  need to be filled in.
  templatePath: path.resolve(__dirName, 'variables.env.template')
}

setEnvFromNote('My App Name.env', options);

About

Set node process environment variables based on a secure note stored in the OS X keychain.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published