5

I currently have a Single Page Application using( React+Redux+React-Router) hosted on firebase hosting. I want to implement server side rendering, for which I am aware I need to run a node/express server on something like Heroku, but I'm unclear how to do this. I have seen many starter boilerplates i.e Este that incorporate server-side-rendering but I want to add this capability to an existing Project. Somehow, The static content hosted on firebase should have access to my server but again unclear how to implement it so i can get al the benefits involved with SSR.

1
  • He mentioned he's already seen some boilerplates out there, but is looking for some guide or process, please don't self-promote without at least being helpful. Commented Mar 6, 2018 at 17:28

1 Answer 1

1

Since you are already using Firebase you can utilize Firebase functions.

Just setup a new function which intercepts your http request and then you just fetch all the stuff you need and render to a string with react routers render to string method.

There is a good tutorial covering all the bits and pieces of this here https://m.youtube.com/watch?v=82tZAPMHfT4

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.