From 5952ff647426e0efa302d22b4196201e4e71c3b2 Mon Sep 17 00:00:00 2001 From: Luxshan2000 Date: Fri, 29 Sep 2023 05:11:50 +0530 Subject: [PATCH] review --- backend/server.js | 2 +- frontend/src/App.js | 2 +- frontend/src/components/AddItems.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/server.js b/backend/server.js index 757ab16..47484f8 100644 --- a/backend/server.js +++ b/backend/server.js @@ -10,7 +10,7 @@ const app = express() const PORT = process.env.PORT || 5000 app.use(cors({ - origin:["*", "http://localhost:3000"],//"exp://192.168.8.182:8081" + origin:["*", "http://51.20.93.112:3000"],//"exp://192.168.8.182:8081" methods:["GET","POST"], credentials:true })) diff --git a/frontend/src/App.js b/frontend/src/App.js index a6b673a..1c96ad4 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -8,7 +8,7 @@ function App() { const [items, setItems] = useState([]) useEffect(()=>{ - axios.get("http://localhost:5000/api/get/items").then(response => { + axios.get("http://51.20.93.112:5000/api/get/items").then(response => { setItems(response.data) }) diff --git a/frontend/src/components/AddItems.js b/frontend/src/components/AddItems.js index 5477e19..db02ed5 100644 --- a/frontend/src/components/AddItems.js +++ b/frontend/src/components/AddItems.js @@ -8,7 +8,7 @@ function AddItems({setItems}) { const handleSubmit = async (ev)=>{ ev.preventDefault() - await axios.post("http://localhost:5000/api/add/item",{name: name } ) + await axios.post("http://51.20.93.112:5000/api/add/item",{name: name } ) setname("") }