Skip to content

Commit

Permalink
Merge pull request #43 from escape-link/2_revert_to_localhost
Browse files Browse the repository at this point in the history
Chore: returns URLs to localhost
  • Loading branch information
Averyberryman authored Oct 19, 2023
2 parents 58671b3 + c5a573a commit 9cc3ca4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"start": "PORT=3001 react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
Expand Down
7 changes: 4 additions & 3 deletions src/apiCalls.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ const getCookie = (name) => {
};

export default async function fetchGameLink() {
const res = await fetch('https://escapelink-be-42ffc95e6cf7.herokuapp.com/api/v0/games', {
method: 'POST',
// const res = await fetch('https://escapelink-be-42ffc95e6cf7.herokuapp.com/api/v0/games', {
const res = await fetch('http://localhost:3000/api/v0/games', {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json',
Expand All @@ -18,4 +19,4 @@ export default async function fetchGameLink() {
}
const data = await res.json()
return data
}
}
3 changes: 2 additions & 1 deletion src/components/Chat/Chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export default function Chat() {
}

const cable = createConsumer(
'wss://escapelink-be-42ffc95e6cf7.herokuapp.com/cable'
// 'wss://escapelink-be-42ffc95e6cf7.herokuapp.com/cable'
'ws://localhost:3000/cable'
);
const newSubscription = cable.subscriptions.create(
{ channel: 'GameChannel', room: roomName },
Expand Down

0 comments on commit 9cc3ca4

Please sign in to comment.