Replies: 1 comment
-
There's a lot of companies that don't build their API in Next.js but instead have a separate backend. getStaticProps/getServerSideProps allow you to fetch data from anywhere so you could indeed have this separation and just fetch the backend from your frontend powered by Next.js |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Newbie question. We normally have separate development teams that build the client-side layer from the server-side integrations into CMS, etc. In other frameworks, I could see them wanting the client-side team to utilize a SSG to build those assets and then the other team would utilize Express/Node to build APIs like those that interact with the CMS.
In Next.js, is that possible to separate out a server-only layer in one project/deployment that runs APIs and provides integration into a CMS...while another project (targeted for client) builds the actual pages and leverages (SSG and/or SSR)?
Does doing this effect things like incremental builds and/or preview mode and SSR?
I assume if you had a Next.js API layer project and then an instance of Next.js project for only building SSG, then you would lose benefits of SSR. So you would really have to have a Next.js server to be that API layer and then a separate Next.js server to build the SSG and to handle SSR for the client-side resources that aren't generated.
Hope I am making sense, and if not, sorry...I come from a Java server-side background.
Beta Was this translation helpful? Give feedback.
All reactions