From 27b8578167c425aa0792fe460e71b0a2c44f65fe Mon Sep 17 00:00:00 2001 From: ireic Date: Sat, 11 Jan 2020 18:29:24 +0100 Subject: [PATCH] Added API_URL to client env --- client/src/shared/utils/api.js | 2 +- client/webpack.config.production.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/shared/utils/api.js b/client/src/shared/utils/api.js index d16feb8..b204f41 100644 --- a/client/src/shared/utils/api.js +++ b/client/src/shared/utils/api.js @@ -6,7 +6,7 @@ import { objectToQueryString } from 'shared/utils/url'; import { getStoredAuthToken, removeStoredAuthToken } from 'shared/utils/authToken'; const defaults = { - baseURL: `http://localhost:${process.env.API_PORT || 3000}`, + baseURL: process.env.API_URL || 'http://localhost:3000', headers: () => ({ 'Content-Type': 'application/json', Authorization: getStoredAuthToken() ? `Bearer ${getStoredAuthToken()}` : undefined, diff --git a/client/webpack.config.production.js b/client/webpack.config.production.js index b8a2723..2ab8ba7 100644 --- a/client/webpack.config.production.js +++ b/client/webpack.config.production.js @@ -61,7 +61,7 @@ module.exports = { new webpack.DefinePlugin({ 'process.env': { NODE_ENV: JSON.stringify('production'), - API_PORT: JSON.stringify('3001'), + API_URL: JSON.stringify('http://jira-api.ivorreic.com'), }, }), new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),