Comments (7)
@vinzun @Butonix proxy is much different behavior with ssr so it does not work the same as in cra. I am not sure why you need a proxy. Any request from the browser goes to the rendering server by default. If you want it to go somewhere else just use the full url. If you really want a proxy you can implement it at the node level in the rendering server.
from create-react-ssr-app.
Adding proxy in package.json is not working but if I add it directly in axios.get() it is working.
This is what I get when it is from the proxy in package.json
And when I npm start I'm getting this DeprecationWarning
Already tried proxy in package.json in create-react-app and it is working.
I, too, wrote about this author, but he ignored me! There is no support, so it is better not to use this repository!
from create-react-ssr-app.
Maybe they are busy, so we wait...
from create-react-ssr-app.
Maybe they are busy, so we wait...
No, he just silently closed my question.
Try razzle he's a lot better
from create-react-ssr-app.
Thanks for the info. I am new to this, learning new stuffs. I also tried it with different framework and noticed that it's not working with any ssr. I'm trying to research about this and spent a lot of time. Thanks again bro!
from create-react-ssr-app.
@vinzun what does your stack look like? Generally a proxy is useful when you want some route (e.g. /my_profile
) to go somewhere else other than the server that served the app. With CRA its useful since the app is served by a webpack dev server and api requests are not handled by that server. So a proxy allows to send api requests to the api server. In my stack I generally use a single node server just for rendering. Create React SSR App comes with this server configured. I then use a different server (rails, node, go, or something else) to handle API requests. In my client code I use the full url for API requests (e.g. http://localhost:3000/my_profile
rather than /my_profile
) so which makes proxy unecessary.
from create-react-ssr-app.
Im creating a website using React and WP Rest Api, it just got me thinking about how headless cms will be called when it comes to production.
from create-react-ssr-app.
Related Issues (17)
- Error to install HOT 16
- How to write your own api breakpoints? HOT 2
- How to fetch data on server side? HOT 3
- Styles don't load in development (JS Disabled) HOT 5
- Customizing webpack config? HOT 4
- Template doesn't run HOT 2
- Hosting on heroku HOT 1
- ESLint Definition for rule '@typescript-eslint/consistent-type-assertions' HOT 3
- when i have updated build on production on server. i am getting __HELMET_META_ATTRIBUTES__ __STYLE_TAGS__ printed in html. HOT 3
- when i have updated build on production on server. i am getting __HELMET_META_ATTRIBUTES__ __STYLE_TAGS__ printed in html HOT 1
- Post Request
- Deployment to server HOT 13
- CSS not loaded? HOT 21
- Implementing redux is not working, I get error unexpected token % HOT 3
- No 'Access-Control-Allow-Origin' header is present on the requested resource HOT 6
- Build Error: Cannot find module ‘./utils/verifyTypeScriptSetup’ HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from create-react-ssr-app.