from Hacker News

Ask HN: Universal JavaScript + separate API project?

by blamarvt on 9/26/16, 1:32 PM with 2 comments

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!

  • by redvulps on 9/26/16, 3:53 PM

    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 ).

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