Is there way to achieve Server Side Rendering of a React Frontend on AdonisJS


#1

Good day everyone, I’m building an API with AdonisJS and want to consume it using ReactJS. I also want the React server-side rendered. Is this possible with AdonisJS? Is there any guide for server-side rendering of React using redux I can take a look at?


#2

For easier and clean implementation I recommend using Next.js.

Simply write your API in Adonis and make your Next.js app consume the API using ajax calls.

Ofcourse, everything can live inside the same codebase (under different folders), but if you plan to deploy them on 2 different servers, it will work fine.


#3

Thanks for the response. To get more clarity, if I have both apps on the same server, I can use a tool like concurrently to start both apps right? Since they are both going to have their own package.json file


#4

Yes, concurrently is the best way to approach this.