Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 1.15 KB

README.md

File metadata and controls

50 lines (33 loc) · 1.15 KB

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