127
rated 0 times
[
130]
[
3]
/ answers: 1 / hits: 17249
/ 6 Years ago, sun, november 18, 2018, 12:00:00
I use dotenv
for read environment variable. like this:
let dotenv = require('dotenv').config({ path: '../../.env' });
console.log(process.env.DB_HOST);
Now I wanna to save changes in .env
file. I can't find any way to save variable in .env
file. What should I do?
process.env.DB_HOST = '192.168.1.62';
More From » node.js