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,5 +1,6 @@
const GraphQLClient = require("graphql-request").GraphQLClient;
require("dotenv").config();
const path = require("path");
require("dotenv").config({ path: path.resolve(process.cwd(), `.env.${process.env.NODE_ENV || 'development'}`) });
//TODO May need to use a different client that includes caching of resources.
exports.client = new GraphQLClient(process.env.GRAPHQL_ENDPOINT, {