Add dotenv dependency in order to allow config/default.js to read .env values and add .env to .gitignore

This commit is contained in:
nsauter 2021-06-21 12:15:59 +00:00
parent f118ec64b0
commit 174c5019ba
4 changed files with 12 additions and 0 deletions

3
.gitignore vendored
View File

@ -1,6 +1,9 @@
.DS_Store .DS_Store
.vscode .vscode
#Nodejs .env Vars
.env
# Logs # Logs
logs logs
*.log *.log

View File

@ -1,5 +1,8 @@
'use strict'; 'use strict';
const dotenv = require('dotenv');
dotenv.config();
module.exports = { module.exports = {
log: { log: {

5
package-lock.json generated
View File

@ -669,6 +669,11 @@
"esutils": "^2.0.2" "esutils": "^2.0.2"
} }
}, },
"dotenv": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz",
"integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q=="
},
"ee-first": { "ee-first": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",

View File

@ -23,6 +23,7 @@
"dependencies": { "dependencies": {
"co-body": "6.1.0", "co-body": "6.1.0",
"config": "3.3.6", "config": "3.3.6",
"dotenv": "^10.0.0",
"koa": "2.13.1", "koa": "2.13.1",
"koa-ejs": "4.3.0", "koa-ejs": "4.3.0",
"koa-locales": "1.12.0", "koa-locales": "1.12.0",