Changed config path for server to use local env files.

This commit is contained in:
Patrick Fic
2020-05-06 17:17:49 -07:00
parent 54320cc53c
commit 33bbcc8c95
12 changed files with 75 additions and 41 deletions

View File

@@ -1,4 +1,11 @@
require("dotenv").config();
const path = require("path");
require("dotenv").config({
path: path.resolve(
process.cwd(),
`.env.${process.env.NODE_ENV || "development"}`
),
});
const Handlebars = require("handlebars");
exports.render = (req, res) => {