Added API_PORT to client env

This commit is contained in:
ireic
2020-01-11 17:22:08 +01:00
parent f1f79dafff
commit 544b1f7e30
3 changed files with 8 additions and 2 deletions

View File

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