Skip to content

Latest commit

 

History

History
16 lines (10 loc) · 427 Bytes

ReadMe.md

File metadata and controls

16 lines (10 loc) · 427 Bytes

JavaScript/Node Dotenv

For using it in node first you have to have:

  1. A Node version installed.

  2. Installed the node-dotenv package. You can do it just by running npm install dotenv --save.

For a .env file like this:

require('dotenv').config(".env");

const DB_NAME = process.env.DB_NAME
console.log(DB_NAME);