Move URL settings into .env file
This commit is contained in:
2
.env.template
Normal file
2
.env.template
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
REACT_APP_AUTH_SERVICE_URL = https://dev-auth.fiskerdps.com
|
||||||
|
REACT_APP_UPLOAD_SERVICE_URL = http://localhost:8080/api/upload
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
const AUTH_URL = 'https://dev-auth.fiskerdps.com';
|
const AUTH_URL = process.env.REACT_APP_AUTH_SERVICE_URL;
|
||||||
|
|
||||||
const auth = {
|
const auth = {
|
||||||
signIn: (username, password) => fetch(`${AUTH_URL}/auth/login`, {
|
signIn: (username, password) => fetch(`${AUTH_URL}/auth/login`, {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
const UPLOAD_ENDPOINT = 'http://localhost:8080/api/upload';
|
const UPLOAD_ENDPOINT = process.env.REACT_APP_UPLOAD_SERVICE_URL;
|
||||||
|
|
||||||
export const getCancelToken = () => {
|
export const getCancelToken = () => {
|
||||||
const token = axios.CancelToken;
|
const token = axios.CancelToken;
|
||||||
|
|||||||
Reference in New Issue
Block a user