Skip to content

Commit

Permalink
finalized
Browse files Browse the repository at this point in the history
  • Loading branch information
Luxshan2000 committed Sep 28, 2023
1 parent 0097ded commit a466584
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const PORT = process.env.PORT || 5000

app.use(cors({
//51.20.93.112
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
}))
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function App() {
const [items, setItems] = useState([])

useEffect(()=>{//51.20.93.112
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)
})
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/AddItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function AddItems({setItems}) {
ev.preventDefault();

try {//51.20.93.112
const response = await axios.post("http://localhost:5000/api/add/item", { name: name });
const response = await axios.post("http://51.20.93.112:5000/api/add/item", { name: name });
setname("");
setItems((prv)=>[...prv,response.data.item])
} catch (error) {
Expand Down

0 comments on commit a466584

Please sign in to comment.