https://github.com/samcrosoft/dotenv-mustache
A node package to help apply the mustache templating language to create dynamic dotenv variables
https://github.com/samcrosoft/dotenv-mustache
Last synced: 6 months ago
JSON representation
A node package to help apply the mustache templating language to create dynamic dotenv variables
- Host: GitHub
- URL: https://github.com/samcrosoft/dotenv-mustache
- Owner: samcrosoft
- License: mit
- Created: 2016-02-22T14:27:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-22T14:49:36.000Z (over 9 years ago)
- Last Synced: 2024-04-27T10:21:17.270Z (about 1 year ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dotenv-Mustache
Dotenv-Mustache integrates the lovely [Mustache](http://github.com/janl/mustache.js) templating language into [dotenv](http://github.com/motdotla/dotenv).
This would allow for the creation of dynamic environment variables.[](https://www.npmjs.com/package/dotenv-mustache)
## Install
```bash
npm install dotenv --save
npm install dotenv-mustache --save
```## Usage
At the entry point of your application, you should require dotenv and dotenv-mustache, and call it into you code
as follows.```js
var dotenv = require('dotenv')
var dotMustache = require('dotenv-mustache')var myEnv = dotenv.config()
dotMustache(myEnv)
```See [test/.env](./test/.env) for examples of mustache expressions in environment variables.