DEV Community

Discussion on: Next.js, Apollo Client and Server on a single Express app

Collapse
 
jcaguirre89 profile image
Cristobal Aguirre

Hi, thank you for the guide it's very well laid out. What is the benefit of having the express server? Why would you need it instead of using the approach from the examples?

Thanks!

Collapse
 
givehug profile image
givehug

Hey, thanks, and sorry for the late reply! The example from Next satisfies all the functional requirements, I only have two organizational concerns:

  1. I want Next to be responsible for rendering client (SSR including) only, so that I can easily extract it to separate repo when needed.
  2. I'm not sure how flexible Next is when it comes to integrating other services into our app, eg DB repository, 3rd party APIs, etc. So I would prefer Next not be the entry point of my app, which integrates all other services.