.env


npm install dotenv

yarn add dotenv
DB_HOST = localhost
DB_USER = root
DB_PASSWORD = 123456789
const db = require(‘db’);
db.connect({
host: process.env.DB_HOST,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD
})

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store