The problem
I'm using create-react-app with Firebase and it's been a dream but I've hit a roadbloack. I'd like to incorporate into my app fetching Open Graph metadata from a user supplied URL but as we know, this is prevented when done in the browser.
This example of Open Graph Metadata With Node is very close to what I'm trying to do.
What I've tried
I've reviewed the readme file, specifically Proxying API Requests in Development.
I've searched the issues here and on the create-react-app Github repo (open and closed) for something relevant. A few results have come back on CORS and similar but still quite a few gaps in how to incorporate something to accomplish this.
I've read tuts suggesting that I should use Express but I'm not sure how that can be incorporated with create-react-app and webpack (not to mention how this would work in production).
I think I'm just not quite putting all the pieces together to accomplish this and would appreciate guidance if someone has the time.
The package.json file{
"name": "my-app",
"version": "0.1.0",
"private": true,
"devDependencies": {
"react-scripts": "1.0.10"
},
"dependencies": {
"firebase": "^3.9.0",
"material-ui": "^0.18.7",
"node-sass-chokidar": "0.0.3",
"npm-run-all": "^4.0.2",
"prop-types": "^15.5.10",
"react": "^15.6.1",
"react-avatar": "^2.3.0",
"react-dom": "^15.6.1",
"react-router-dom": "^4.1.2",
"react-tap-event-plugin": "^2.0.1"
},
"scripts": {
"build-css": "node-sass-chokidar src/ -o src/",
"watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive",
"start-js": "react-scripts start",
"start": "npm-run-all -p watch-css start-js",
"build": "npm run build-css && react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}