Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 753 Bytes

README.md

File metadata and controls

33 lines (24 loc) · 753 Bytes

ckey - a dotenv plugin.

Simple and easy way to access dotenv file secrets and use it anywhere in your sub-directory.

▶️ Installation

npm install ckey

📝 Usage

Create a .env file in the root directory of your project. Add environment-specific variables on new lines in the form of NAME=VALUE. For example:

  • .env file from main directory.
# dotenv sample content

[email protected]
PASSWORD=iampassword123

API_KEY=1234567890
  • some js file from sub-directory
const ck = require('ckey');

const userName = ck.USER;     // [email protected]
const password = ck.PASSWORD; // iampassword123
const apiKey   = ck.API_KEY;  // 1234567890

📜 License

The MIT License (MIT) Jorge Rosal