Fixed ports

This commit is contained in:
ireic
2020-01-11 15:19:47 +01:00
parent fe4ef2f981
commit f1f79dafff
5 changed files with 23 additions and 32 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:3000',
baseURL: `http://localhost:${process.env.PORT || 3000}`,
headers: () => ({
'Content-Type': 'application/json',
Authorization: getStoredAuthToken() ? `Bearer ${getStoredAuthToken()}` : undefined,