Skip to content

Instantly share code, notes, and snippets.

View davidekete's full-sized avatar
🎯
Focusing

David Ekete davidekete

🎯
Focusing
View GitHub Profile
@davidekete
davidekete / updateEnv.js
Last active November 15, 2023 11:32
A script that watches your .env file and updates your .env.example file
const fs = require('fs');
const chokidar = require('chokidar');
const envFilePath = './.env';
const exampleFilePath = './.env.example';
/**
* Reads the contents of the .env file and returns an array of variable names.
* @returns A set of variable names from the .env file.
*/