New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

envalidator

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

envalidator

Express middleware to alert if any needed env variable hasn't been set.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

envalidator

Express middleware to alert if any needed env variable hasn't been set.

How to install

npm install --save envalidator

How to use

const envalidator = require("envalidator");
const app = express();

app.use(envalidator()); // This will analyze your .js using process.cwd() -the node process directory- as root path
// or
app.use(envalidator(path.dirname(__filename))); // Here it'd use this .js file's location directory as root path
// or you can specify one specific path as root

Now, if you're trying to access some process.env variable in your codebase, instead of responding your expected routes, it'll show a nice warning message.

Keywords

express

FAQs

Package last updated on 26 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts