node.js - React app: Using Node/express as middle-end proxy server -
i building react app traditional restful api server (golang). straight-forward approach easily:
react --> redux (or flux) --> go server
however i'm thinking of plugging in node/express middle end, stack becomes:
react --> redux --> node/express --> go server
the benefits can think of are:
- server side rendering
- faster form validation
- wash data before sending off go api, numerous amazing node packages
- manage authentication , sessions easily
the cons apparent, added layer, requests go back-end take more time , forth.
i pretty new architecture, great know if people using stack in production projects? how experience?
we using similar stack react --> redux --> node/express or go server
our application. sacrificed additional latency proxy node server ability connect sso server (different our go server), server side rendering.
the reason chose because public facing website allows users share posts facebook. if didn't have server side render, need pay expensive service prerender.io.
the thing propose (which did) make calls, rendering or stuff related sso, through node server, allow direct api request go directly go server. unless need each request between go , react, recommend prevent overhead.
Comments
Post a Comment