Is Next.js a Good Choice for Backend Development?

0
0
Asked By CreativeCoder23 On

I recently read an article that criticized using Next.js for backend development, but I've already built a full-stack web app with it and my codebase has grown to about 15,000 lines. I'm wondering if it's really that bad and if I should consider refactoring to a separate backend service? If so, what would you recommend for that? Thanks!

2 Answers

Answered By BackendBuddy99 On

Using Next.js can work for some back-end routes, but it really doesn’t scale well in the long run. We ended up setting up a dedicated backend on a separate instance and just keeping our frontend on Next.js. It made our lives much easier!

CodeCrusher456 -

Yeah, I’ve heard mixed reviews about using Next.js for backend too. Sometimes it just makes more sense to separate concerns.

Answered By TechieTina77 On

There are definitely some advantages to using Next.js for the backend, like being able to share code easily without duplication. It ultimately depends on your team's needs. In my startup, we use Next.js for both frontend pages and backend tasks like webhooks and admin screens. We're trimming down our use of lambdas, and so far, everything's working well without major issues. Though I do miss the simpler setups I was used to, I'd say Next.js has done fine for us as we scale. Just keep in mind that it's not really suited for an app that only needs backend functionality—if that's your case, options like Express or Go might be better.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.