
Ask HN: Universal JavaScript + separate API project? - blamarvt
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.<p>I&#x27;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).<p>Does anyone have a project like this they might be willing to link to? Every react&#x2F;angular boilerplate project I&#x27;ve found has the API tightly integrated into the javascript!<p>Thanks!
======
redvulps
I had this scenario(or at least close to it) on the company that I've worked
before. We had a nodejs/angular frontend and all the backend were spread
across multiple api(each api was a microservice).

It 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](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 :)

~~~
blamarvt
Not really what I'm looking for, but thanks for the reply!

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.

