Skip to content

Commit

Permalink
chore: drop dotenv devDependency and usage (#82)
Browse files Browse the repository at this point in the history
The same effect can be had by manually using one of:
    FOO=bar node ...
    env `cat my.env` node ...
  • Loading branch information
trentm authored Apr 13, 2021
1 parent 3d14e47 commit b0622ef
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 17 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ For a complete list of PostgreSQL environment variables [see the
official
documentation](https://www.postgresql.org/docs/9.5/static/libpq-envars.html).

In development, you can create a `.env` file in the root of the project
containing all your secret environment variables. See
[dotenv](https://github.com/motdotla/dotenv) for details.

## Bootstrap

Populate the database with tables and basic data:
Expand Down
6 changes: 0 additions & 6 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"workload": "^2.4.3"
},
"devDependencies": {
"dotenv": "^8.2.0",
"standard": "^16.0.3"
},
"scripts": {
Expand Down
7 changes: 1 addition & 6 deletions server/config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
'use strict'

const pkg = require('../package')
let env = process.env.NODE_ENV || 'development'

if (env === 'development') {
require('dotenv').config()
env = process.env.NODE_ENV || env // in case dotenv changes NODE_ENV
}
const env = process.env.NODE_ENV || 'development'

const conf = module.exports = {
env: env,
Expand Down

0 comments on commit b0622ef

Please sign in to comment.