Perform data operations on mongodb database according to different routes
Are you talking about REST API? If so, there are already many third-party implementations. There is information about these frameworks in the document: https://docs.mongodb.com/ecosystem/tools/http-interfaces/ Actually What framework to use and how to operate the database are two relatively independent issues. No matter what framework NodeJS uses to operate MongoDB, it cannot do without one of the two drivers: mongoose or node-mongodb native. As for when to call these drivers to access the database, it depends on the usage habits of KOA or other frameworks. So I don't see anything special that needs to be explained when using the koa framework and mongodb together. You can refine the problem a little more.
Are you talking about REST API? If so, there are already many third-party implementations. There is information about these frameworks in the document:
https://docs.mongodb.com/ecosystem/tools/http-interfaces/
Actually What framework to use and how to operate the database are two relatively independent issues. No matter what framework NodeJS uses to operate MongoDB, it cannot do without one of the two drivers: mongoose or node-mongodb native. As for when to call these drivers to access the database, it depends on the usage habits of KOA or other frameworks. So I don't see anything special that needs to be explained when using the koa framework and mongodb together. You can refine the problem a little more.