Ask HN: Universal JavaScript + separate API project?
Javascript has a rich ecosystem around rendering and displaying webpages but there are other languages which are subjectively better at data modeling and efficiently implementing an API.
I've been looking for a project which successfully separates the API from the frontend and also provides a server-side render (aka universal, aka isomorphic).
Does anyone have a project like this they might be willing to link to? Every react/angular boilerplate project I've found has the API tightly integrated into the javascript!
Thanks!
2 comments
[ 3.0 ms ] story [ 17.2 ms ] threadIt does scale very well, considering that all the microservices are written in ruby.
And for the SEO thing, there was a varnish server before the frontend server that sends bots request to a custom prerender server ( https://github.com/prerender/prerender ).
So basically, normal users were redirected to the nodejs app, and google and others crawlers were redirected to prerender.
I dunno exactly if this is what you want to get with "also provides a server-side render", but I guess it's close to what you're looking for :)
I'm really looking for an opinionated Javascript library/framework which would allow me to write Javscript once for clients and render both on the server side and client side with the same code.
For me pre-rendering isn't just about bots, it's about not having to use Javascript at all if the client doesn't want to.
The lag associated with calling an external service would also be a non-starter as it's a pretty dynamic site. But I'd imagine it would work well with highly static sites. Thanks again.