Skip to content

Commit 4f68ea2

Browse files
proxy:localdev
1 parent 88a4bb4 commit 4f68ea2

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,5 @@
8080
"devDependencies": {
8181
"gh-pages": "^3.1.0"
8282
}
83-
}
83+
84+
}

src/components/Medium/Medium.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Medium extends React.Component {
1919
}
2020
};
2121
componentDidMount() {
22-
this.fetchBlogs();
22+
//this.fetchBlogs();
2323
}
2424

2525
render() {

src/components/Twitter/Twitter.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class Twitter extends React.Component {
3333
axios
3434
.get(base + "/getLikedTweets")
3535
.then((Response) => {
36+
console.log(Response);
3637
this.likedTweets = Response.data;
3738
this.loadLikedTweets();
3839
})
@@ -64,6 +65,7 @@ class Twitter extends React.Component {
6465
};
6566

6667
render() {
68+
6769
return (
6870
<React.Fragment>
6971
<Row className="twitter-container">

setupProxy.js renamed to src/setupProxy.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
const proxy = require('http-proxy-middleware')
1+
const {createProxyMiddleware} = require('http-proxy-middleware')
22
// this proxy code allows the use of .netlify/function in both development and production
33
module.exports = function(app){
44
app.use(
5-
proxy(
5+
createProxyMiddleware(
66
"/.netlify/functions", {
77
target: "http://localhost:9000",
88
pathRewrite: {
9-
"^/\\.netlify/functions": ""
9+
'^/\\.netlify/functions': ''
1010
}
1111
}
1212
)

0 commit comments

Comments
 (0)