Skip to content
This repository was archived by the owner on Mar 4, 2022. It is now read-only.

Commit b1588cb

Browse files
committed
Use full path for dotenv config
1 parent fd8ba39 commit b1588cb

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

backend/config/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
import { join } from 'path';
12
// require('dotenv').config();
2-
require('dotenv').config({ path: '../../.env' });
3+
require('dotenv').config({ path: join(__dirname, '../../', '.env') });
34

45
const env = process.env;
56

backend/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ app.use(express.static(join(__dirname, '../frontend/build')));
8989
app.get('*', (req, res) =>
9090
res.sendFile(resolve(__dirname, '../frontend/build/index.html'))
9191
);
92-
server.listen(PORT, () =>
93-
// console.log('CONFIG:', CONFIG, `\nListening on port: ${PORT}`)
94-
console.log(`Listening on port: ${PORT}`)
95-
);
92+
server.listen(PORT, () => {
93+
console.log('CONFIG:', CONFIG, `\nListening on port: ${PORT}`);
94+
console.log(`Listening on port: ${PORT}`);
95+
});

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"@types/mongoose": "^5.2.5",
6161
"@types/morgan": "^1.7.35",
6262
"@types/multer": "^1.3.7",
63-
"@types/node": "^10.0.3",
63+
"@types/node": "^10.7.1",
6464
"@types/nodemailer": "^4.6.2",
6565
"@types/nodemailer-mailgun-transport": "^1.3.3",
6666
"@types/passport": "^0.4.5",

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outDir": "dist",
77
"sourceMap": true,
88
"target": "es6",
9-
"typeRoots": ["./backend/typings"],
9+
"typeRoots": ["./backend/typings", "./node_modules/@types"],
1010
// "strict": true,
1111
"allowJs": true,
1212
"removeComments": true,

0 commit comments

Comments
 (0)