Hacker News new | past | comments | ask | show | jobs | submit login

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.




We 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 :)


Their 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 (well they probably use a slightly customized version but this is what they open sourced).


We are not using php-v8js for server rendering at FB.


I stand corrected. :)


Relay 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




Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: