diff --git a/nodeapp/app.js b/nodeapp/app.js index a22ed49..007c5be 100644 --- a/nodeapp/app.js +++ b/nodeapp/app.js @@ -1,5 +1,7 @@ // Initialize project const db = require('./db/db') +const path = require('path') +require('dotenv').config({path: path.join(__dirname, '../.env')}) const express = require('express'); const app = express(); @@ -79,5 +81,6 @@ app.get('/cleanup', (req, res) => { // listen for requests :) const listener = app.listen(process.env.PORT || 4200, function() { + console.log(process.env.DB_USER) console.log("Your app is listening on port " + listener.address().port); }); diff --git a/nodeapp/utils/import.js b/nodeapp/utils/import.js index b711b11..f7831e0 100644 --- a/nodeapp/utils/import.js +++ b/nodeapp/utils/import.js @@ -1,7 +1,7 @@ const db = require('../db/db') const request = require('request') const path = require('path') -const dotenv = require('dotenv').config({path: path.join(__dirname, '../../.env')}) +require('dotenv').config({path: path.join(__dirname, '../../.env')}) // The URL from which to export production data const url = 'https://jasonsplant.glitch.me/exportall'