Added API_URL to client env

This commit is contained in:
ireic
2020-01-11 18:29:24 +01:00
parent 7be6b72a9d
commit 27b8578167
2 changed files with 2 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ import { objectToQueryString } from 'shared/utils/url';
import { getStoredAuthToken, removeStoredAuthToken } from 'shared/utils/authToken'; import { getStoredAuthToken, removeStoredAuthToken } from 'shared/utils/authToken';
const defaults = { const defaults = {
baseURL: `http://localhost:${process.env.API_PORT || 3000}`, baseURL: process.env.API_URL || 'http://localhost:3000',
headers: () => ({ headers: () => ({
'Content-Type': 'application/json', 'Content-Type': 'application/json',
Authorization: getStoredAuthToken() ? `Bearer ${getStoredAuthToken()}` : undefined, Authorization: getStoredAuthToken() ? `Bearer ${getStoredAuthToken()}` : undefined,

View File

@@ -61,7 +61,7 @@ module.exports = {
new webpack.DefinePlugin({ new webpack.DefinePlugin({
'process.env': { 'process.env': {
NODE_ENV: JSON.stringify('production'), NODE_ENV: JSON.stringify('production'),
API_PORT: JSON.stringify('3001'), API_URL: JSON.stringify('http://jira-api.ivorreic.com'),
}, },
}), }),
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),