dotenv-prompter
v0.9.1
Published
cli prompt for .env files
Downloads
4
Readme
dotenv-prompter
cli Prompt for .env files
Usage
npm install dotenv-prompter --save-dev
create a JSON file .env.json
{
"PORT": {
"description": "Port of the app",
"message": "Port is a required integer",
"type": "integer",
"required": true,
"default": 3001
},
"DATABASE_HOST": {
"description": "Database host",
"message": "Database host is required",
"type": "string",
"required": true,
"default": "localhost"
},
"PASSWORD": {
"description": "The password",
"message": "The password is required",
"type": "string",
"replace": "*",
"required": true,
"hidden": true
}
}
see also https://www.npmjs.com/package/prompt
Add to your package.json, e. g.
"scripts": {
"postinstall": "dotenv-prompter"
}
and you get an .env file in your Project. It just asks for the missing elements
Properly exclude it via .gitignore, so every dev can have individual .env file