DEV Community

Discussion on: When NOT to choose Next.js

dayvista profile image
dayvista • Edited on

CDN: Next can be configured to use a CDN (see the docs), although the prefix for files in the /public folder needs to be introduced manually (using a base path could work, I believe).

API Routes: I'd like some clarification on this point. I've been working on a Next app where auth is tightly coupled to Next's API routes, and securing the routes has been quite easy as a result. Combined with row level security in Postgres on the back end, I don't see anything to worry about. Then again, I am new to the back end, so any further explanation would be helpful.

pankajpatel profile image
Pankaj Patel Author

Thanks @dayvista
I wasn't aware of CDN part that much as I assumed that node server is handling all request then CDN could not be a way to go to use the benefits of next's SSR.

I stand corrected.

For Routes, even though it works perfectly inside next.js, my opinion is that Basic CRUD operations don't need much from server and hence not much of the concern

But the Business specific APIs where things like 3rd party communication, some native lib integration, there are better tools to do this job