I have recently been learning the fundamentals of the MERN stack and Next.js, and feel I understand the basic however I have some questions still...
If I have a complete full stack MERN app (ie node/express backend with a mongodb database serving a React front end), could I theoretically replace that entire app with Next.js? What are the pros/cons/considerations with this idea?
Could I potentially have a Next.js app that connects to my own node/express/mongodb back-end? If so, would this essentially be my Next.js app connecting to my node/express back-end directly in my getStaticProps/getServerSideProps functions with fetch(/or axios) without needing an api defined in the pages/api directory? What are the pros/cons/considerations with this idea?
If I went with #2 approach above (assuming it's a sensible idea), would there essentially be 2 'backend servers' involved in this project? One that is created by Next.js (where all the SSR-ing and SSG-ing is taking place), and the other that is my separate node/express/mongodb app?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.