NextJS & Express Architecture #14024
Unanswered
ChrisEdson
asked this question in
Help
Replies: 1 comment
-
If anyone has any ideas here, I'd be very appreciative 🙏 😃 |
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.
-
Hey guys -
I'm looking for some architecture advice. We current run NextJS for all of our site - www.secondnature.io.
The new work on SSG (and the recent updates in 9.4) are awesome 🚀.
We have one monorepo that deals with the whole
www.secondnature.io
domain - including API requests from our app.All API endpoints are behind the path
www.secondnature.io/api/
. Everything is handled by Express (including the routing to NextJS pages).It's all hosted on AWS Elasticbeanstalk, running a Node runtime.
What I'd love to do is split off our main pages run through NextJS to a CDN or using something like Vercel. Ideally I'd just split it - so that any requests to
/api/
would go to the Node.js environment, whereas the NextJS pages would go to a CDN.We're starting to expand from the UK where we're currently based - so having those webpages at CDNs across the world would be really helpful (even if the
/api/
requests still have to go to our servers in AWS London).Any suggestions for how to architect this would be really amazing! From what I can see, you can split DNS resolution by paths. There's maybe something we could do using an AWS Load Balancer to split requests by paths - but I'm not sure.
Help really appreciated!
Beta Was this translation helpful? Give feedback.
All reactions