Skip to content

Commit

Permalink
I really hope this fixes babel + dotenv
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoowan committed Feb 13, 2021
1 parent 52d366f commit 813f7db
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 35 deletions.
12 changes: 1 addition & 11 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
{
"presets": ["env"],
"plugins": [
["dotenv-import", {
"moduleName": "@env",
"path": ".env",
"blacklist": null,
"whitelist": null,
"safe": false,
"allowUndefined": true
}]
]
"presets": ["env"]
}
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ The following npm modules are used in the server:
* express-http-to-https
* babel-preset-env
* babel-cli (-g)
* babel-plugin-dotenv-import

The following npm modules are used in the client:
* react
Expand Down
1 change: 1 addition & 0 deletions env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require('dotenv').config({ silent: true })
26 changes: 9 additions & 17 deletions package-lock.json

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

6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@
"main": "server.js",
"scripts": {
"client-install": "npm install --prefix client",
"start": "babel-node server.js",
"server": "nodemon --exec babel-node server.js",
"server": "nodemon --exec babel-node server.js --require dotenv/config",
"client": "cd client && npm start",
"dev": "concurrently \"npm run server\" \"npm run client\"",
"heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client"
},
"author": "mrdoowan",
"license": "MIT",
"dependencies": {
"aws-sdk": "^2.840.0",
"babel-plugin-dotenv-import": "^2.1.0",
"aws-sdk": "^2.843.0",
"babel-preset-env": "^1.7.0",
"bcrypt": "^5.0.0",
"concurrently": "^5.3.0",
Expand Down
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Import Routes
import dotenv from 'dotenv';
import _ from './env';
import authV1Routes from './routes/apiV1/authRoutes.js';
import leagueV1Routes from './routes/apiV1/leagueRoutes.js';
import seasonV1Routes from './routes/apiV1/seasonRoutes.js';
Expand All @@ -10,9 +10,9 @@ import matchV1Routes from './routes/apiV1/matchRoutes.js';
import staffV1Routes from './routes/apiV1/staffRoutes.js';
import { AWS_RDS_STATUS } from './services/Constants';
import { checkRdsStatus, stopRdsInstance } from './functions/apiV1/dependencies/awsRdsHelper';
//console.log(_.OLD_PROFILE_HID_SALT);

/* Declaring npm modules */
dotenv.config();
const express = require('express');
const app = express();
const bodyParser = require('body-parser');
Expand Down

0 comments on commit 813f7db

Please sign in to comment.