Skip to content

Commit

Permalink
remove needing proxy to hit localhost api
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Fan committed Jun 22, 2019
1 parent e226188 commit 993f4df
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/data/RestInteraction.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down

0 comments on commit 993f4df

Please sign in to comment.