env-tracking
TypeScript icon, indicating that this package has built-in type declarations

1.1.5 • Public • Published

NPM Version license Downloads Install Size

Installation

npm install env-tracking

Usage

Create a .env file in the root of your project:

SECRET_KEY="YOUR_SECRET_KEY"
SECRET_HASH="YOUR_SECRET_HASH"

then import and use it in your application.

CommonJS

const env = require("env-tracking").default;

ES module

import env from "env-tracking";

Example

  • Get Getting value from .env file
const key = env.get("SECRET_KEY");

console.log(key); // YOUR_SECRET_KEY
  • Set Set value to .env file, and you can make more than one
env.set(
  [
    { key: "SECRET_KEY", value: "YOUR_SECRET_KEY" },
    { key: "SECRET_HASH", value: "YOUR_SECRET_HASH" }
  ], "./../.env" // path of .env file include filename
);

Package Sidebar

Install

npm i env-tracking

Weekly Downloads

8

Version

1.1.5

License

MIT

Unpacked Size

6.61 kB

Total Files

6

Last publish

Collaborators

  • trackingx