diff --git a/package.json b/package.json index d200d79..ebfea2d 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/apiCalls.js b/src/apiCalls.js index 1a90960..3c913e5 100644 --- a/src/apiCalls.js +++ b/src/apiCalls.js @@ -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', @@ -18,4 +19,4 @@ export default async function fetchGameLink() { } const data = await res.json() return data -} \ No newline at end of file +} diff --git a/src/components/Chat/Chat.js b/src/components/Chat/Chat.js index a2c81c3..d92f755 100644 --- a/src/components/Chat/Chat.js +++ b/src/components/Chat/Chat.js @@ -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 },