Question

Getting multiple stack data in Next JS SSR

  • 9 February 2024
  • 2 replies
  • 46 views

Badge

Hi, 

I am using Next JS with Contentstack SDK.

Using the single frontend deployment strategy, I am attempting to add the multisite code in Next JS.
Is it possible for the Next JS server side rendering code to get the stack info based on domains and then load all the components based on that ?


2 replies

Badge

Hi,
Is there any update on this?
 

Hi @Sunakshi Chagti,

There are several approaches to solve this problem. Vercel has documented one such approach here: https://vercel.com/guides/nextjs-multi-tenant-application that leverages the app router and their “platforms” starter kit. You can then build on top of this by mapping the incoming domain (available in params) to your stack credentials.

Hope this helps you get started,

Suvish

Reply