airbnb / hypernova

A service for server-side rendering your JavaScript views
MIT License
5.82k stars 208 forks source link

Hypernova with Rails API #85

Closed arefaslani closed 7 years ago

arefaslani commented 7 years ago

Having a Rails API as backend, can I use Hypernova to render json data retrieved from the API and use that data for server side rendering? Is there any example showing how to use Rails API with Hypernova?

ljharb commented 7 years ago

When you say "Rails API", do you also mean Rails is your webserver?

arefaslani commented 7 years ago

@ljharb I use Nginx + Unicorn combination

goatslacker commented 7 years ago

There's a simple Rails example which can be found here. Is that what you're looking for?

arefaslani commented 7 years ago

@goatslacker No. I have a Rails JSON API (api.chanka.ir) as back-end and a React application for front-end. Is it possible to use Hypernova for server-side rendering in this type of applications?

ljharb commented 7 years ago

You'd need an actual web server - the thing serving your frontend - to hook into hypernova. The API should be mostly irrelevant.