Skip to content

bug3/uniquenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Uniquenv is a tool for safe environment files.

  • Quick: You can use environment variables safely without using any password.
  • Unique: Your environment files are unique. Even if your files are stolen, they cannot be used on another computer.

Installation

npm install uniquenv

Usage

  • Create environment file:
const uniquenv = require('uniquenv');

const data = {
    host: uniquenv.input('Host: '),
    username: uniquenv.input('Username: '),
    password: uniquenv.password('Password: ')
};

const file = 'db.uniquenv';

uniquenv.create(file, data);
  • Use environment variables:
const uniquenv = require('uniquenv');

const file = 'db.uniquenv';

const db = uniquenv.parse(file);

console.log(
    db.host,
    db.username,
    db.password
);

License

MIT