Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>env vaults for nodejsNew to Visual Studio Code? Get it now.
env vaults for nodejs

env vaults for nodejs

omkarbhede

|
146 installs
| (0) | Free
manage your environment variables
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Manage NodeJS Enviroment Variables - Simple & Secure

Dont know how to manage enviroment variables for your NodeJS project ? This is a simple way to do it.

  • To access on web : app.envvaults.com
  • Preview In Vs Code :

step 1

step 2

Why to Use ?

  • with Just Two Enviroment variables EV_AID & EV_KEY you can access all required env variables.
  • No need to Store any env variables in your codebase or CI/CD pipeline.
  • access from Web or VS Code extension.

Installation in NodeJS Project

To inject env variables into your Node.js application, you need to install the envvaults package from npm: link

npm install envvaults

Usage

const envvaults = require("envvaults");

await envvaults.load();

envvaults.load()

The load function fetches environment variables from the Env Vaults API and loads them into your Node.js environment using the dotenv package.

Requires proccess.env to have two variables already set:

  1. process.env.EV_AID => account ID can be found in Settings on app.envvaults.com
  2. process.env.EV_KEY => this is secret key of vault

with these two variables, this package will fetch all the variables from vault and set them in process.env

NOTE : dont pass any arguments to load() function

Example:

//starting point of your application
const envvaults = require("envvaults");

async function main() {
  try {
    await envvaults.load();

    const express = require("express");
    const mongoose = require("mongoose");
    // Your application logic here
  } catch (error) {
    console.error(error);
  }
}

main();

Configuration

Environment Variables

To configure this package, you need to set the following environment variables in your .env file:

  • EV_AID: Your Env Vaults Account ID.
  • EV_KEY: Your Env Vaults Key.

Error Handling

  • If AID or KEY is missing in the .env file, a warning message is logged.
  • If there is an error during the HTTPS request or the response does not contain the expected data, an error message is logged.

License

This package is licensed under the MIT License.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft