Added API_URL to client env
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -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$/),
|
||||||
|
|||||||
Reference in New Issue
Block a user