Skip to content

Commit

Permalink
Added env file to .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
Tpojka committed Jul 7, 2020
1 parent 6e98f25 commit 7bc1d24
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 79 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
config/config.env
File renamed without changes.
121 changes: 44 additions & 77 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"main": "app.js",
"scripts": {
"start": "cross-env NODE_ENV=production node app",
"dev": "cross-env NODE_ENV=development nodemon app"
"dev": "cross-env NODE_ENV=development nodemon app",
"postinstall": "node ./scripts/post-install.js"
},
"author": "Brad Traversy",
"license": "MIT",
Expand All @@ -15,6 +16,7 @@
"express": "^4.17.1",
"express-handlebars": "^4.0.4",
"express-session": "^1.17.1",
"fs-extra": "^9.0.1",
"method-override": "^3.0.0",
"moment": "^2.27.0",
"mongoose": "^5.9.19",
Expand Down
8 changes: 8 additions & 0 deletions scripts/post-install.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const fs = require('fs-extra')

try {
fs.copySync('./config/config.env.example', './config/config.env')
console.log('Environment file created successfully.')
} catch (err) {
console.error(err)
}

0 comments on commit 7bc1d24

Please sign in to comment.