Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
Update backend.js and newsList.tsx to use IP address instead of local…
Browse files Browse the repository at this point in the history
…host
  • Loading branch information
nmcc1212 committed Apr 18, 2024
1 parent b62f77f commit ebdada3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion intro to react/fun-with-react/backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ app.post('/api/fetchNews', async (req, res) => {
const rssFeedUrls = req.body.rssFeedUrls;
console.log(`Fetching and parsing RSS feeds from: ${rssFeedUrls}`);
const responses = await Promise.all(
rssFeedUrls.map(url => axios.get(`http://localhost:50110?feedURL=${url}`))
rssFeedUrls.map(url => axios.get(`http://100.88.40.21:50110?feedURL=${url}`))
);
const data = await Promise.all(responses.map(response => response.data));

Expand Down
2 changes: 1 addition & 1 deletion next/news-aggregation/src/components/newsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function NewsList(props: Readonly<{
try {
setIsLoading(true);
if (Array.isArray(props.rssFeedUrls)) {
const response = await axios.post('http://localhost:50111/api/fetchNews', {
const response = await axios.post('http://100.88.40.21:50111/api/fetchNews', {
// const response = await axios.post('http://100.125.70.69:50111/api/fetchNews', {
rssFeedUrls: props.rssFeedUrls,
});
Expand Down

0 comments on commit ebdada3

Please sign in to comment.