Home > Software engineering >  back-end integrated into the front-end in Next.js
back-end integrated into the front-end in Next.js

Time:01-23

I'm new in this area, however I would like to know, if it is better to put api inside my project, or create one back-end separate and pull into the project. I know if I use a separate back-end I will have to buy 2 hosting, if I use it within my project it would be one.

back-end integrated into the project

back-end separate

I tried to do both ways, and apparently it worked, but I would like to know if it is recommended to put the back-end inside the front-end

CodePudding user response:

It depends on your needs and budget. if your project requires a lot of data processing or complex business logics it may be beneficial to separate your API from the front-end. However if your project is simple and doen't require a lot of data processing then it maybe more cost-efficient to host the API within your Next.js project with a single server.

  • Related