From 993f4df62519db3cd615a2ab1488ddf2d46195c5 Mon Sep 17 00:00:00 2001 From: Kevin Fan Date: Sat, 22 Jun 2019 01:38:37 +0100 Subject: [PATCH] remove needing proxy to hit localhost api --- package.json | 1 - src/data/RestInteraction.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index ba88c5a..c39eedf 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,6 @@ "version": "0.1.0", "private": true, "homepage": "https://kevfan.github.io/react-to-do", - "proxy": "http://localhost:8080", "dependencies": { "@material-ui/core": "^4.1.1", "@material-ui/icons": "^4.2.0", diff --git a/src/data/RestInteraction.js b/src/data/RestInteraction.js index 462de22..7c11d02 100644 --- a/src/data/RestInteraction.js +++ b/src/data/RestInteraction.js @@ -10,7 +10,7 @@ import { } from "../constants/Messages"; import {HOME, LOGIN} from "../constants/RouterRoutes"; -const apiUrl = process.env.NODE_ENV === 'production' ? 'https://cors-anywhere.herokuapp.com/https://spring-todo-backend-server.herokuapp.com' : 'http://localhost:3000'; +const apiUrl = process.env.NODE_ENV === 'production' ? 'https://cors-anywhere.herokuapp.com/https://spring-todo-backend-server.herokuapp.com' : 'http://localhost:8080'; export function findAllTodo(setTodosToState, globalActions, props) { fetch(apiUrl + '/api/v1/todo', {