Search code examples
reactjsfirebasehostingserver-side-renderingfirebase-hosting

how to render ssr project on firebase hosting without using functions?


I built a website and deployed it to firebase and everything was rendered correctly. I changed the project architecture to be Server-Side-Rendering, which means that now I run 'server.js' file and not 'index.html'. Is there any way to host my SSR website on firebase without using 'Functions'? I researched the web but couldn't find any other approach.


Solution

  • Firebase Hosting serves only static assets. It does not in any way interpret the files that it servers.

    The only way to get the code in interpreted server-side is by linking Firebase Hosting with Cloud Functions, or Cloud Run. If you don't want to do that, there's no way to get SSR on Firebase Hosting.