diff --git a/project-example/week-9/eventonica/eventonica-code/README.md b/project-example/week-9/eventonica/eventonica-code/README.md index 04967e0fc..ca65f263e 100644 --- a/project-example/week-9/eventonica/eventonica-code/README.md +++ b/project-example/week-9/eventonica/eventonica-code/README.md @@ -40,7 +40,7 @@ npm install npm start ``` -Note: Server runs on http://localhost:4001 and client on http://localhost:3000 +Note: Server runs on http://localhost:4000 and client on http://localhost:3000 ## Room for Improvement diff --git a/project-example/week-9/eventonica/eventonica-code/client/src/components/Users.jsx b/project-example/week-9/eventonica/eventonica-code/client/src/components/Users.jsx index 09c2a724e..be3a81b87 100644 --- a/project-example/week-9/eventonica/eventonica-code/client/src/components/Users.jsx +++ b/project-example/week-9/eventonica/eventonica-code/client/src/components/Users.jsx @@ -11,7 +11,7 @@ const Users= ()=> { // client/src/components/Users.js const getUsers = async () => { - const response = await fetch("http://localhost:4001/users"); + const response = await fetch("http://localhost:4000/users"); const user = await response.json(); setUsers(user); }; @@ -26,7 +26,7 @@ const Users= ()=> { e.preventDefault(); const newUser = { id, name, email }; //console.log(newUser) - const rawResponse = await fetch("http://localhost:4001/users", { + const rawResponse = await fetch("http://localhost:4000/users", { method: "POST", headers: { Accept: "application/json", @@ -46,7 +46,7 @@ const Users= ()=> { const handleDeleteUser = async (deleteUser) => { // Simple DELETE HTTP request with async await - let response = await fetch(`http://localhost:4001/users/${deleteUser}`, { + let response = await fetch(`http://localhost:4000/users/${deleteUser}`, { method: "DELETE" }); await response.json();