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("") }