5 ms·
Can someone explain to me how are they using all JS (node incl server-side rendering) stack in a company that is known for using PHP on the backend ? Do they h
by polskibus 11y ago
Can someone explain to me how are they using all JS (node incl server-side rendering) stack in a company that is known for using PHP on the backend ?
Do they have a specific PHP-to-Node bridge on the server side? If they write isomorphic code, either they are writing apps completely separate from PHP or they have some kind of integration (Node-in-PHP?) running?
I would be grateful for hints, I'm looking into working more with FB tech but I can't do Node on the server right now. Knowing how their architecture looks like with PHP/Hack on the backend would really help.
- petrbela 11y agoTheir GraphQL server is written in PHP. They've made the reference implementation (graphql-js) in JS + the server in Express but they're not using that in production. For server side rendering of the React app, they use https://github.com/reactjs/react-php-v8js https://github.com/reactjs/react-php-v8js (well they probably use a slightly customized version but this is what they open sourced).
- deleted 11y ago[deleted]
- cpojer 11y agoWe are experimenting with it and I've built a service for JS at FB. I'm convinced that server rendering should be transparent to a product developer – ie no special work should be required and the server rendering infra should decide automatically whether it will render on the server or not. Relay has a special server rendering mode that we created that I'm hoping to speak about soon. Until then I'm afraid I can't say more than that :)
- deleted 11y ago[deleted]
- methyl 11y agoRelay and GraphQL are backend agnostic which means you can write a GraphQL server in any language and then use it in connection with Relay and ReactJS. Even a Ruby implementation is already there: https://github.com/rmosolgo/graphql-ruby https://github.com/rmosolgo/graphql-ruby