Build your own MVC framework based on Koa2

Express and Koa are lightweight web frameworks. Although they are flexible and simple, and you can start the server in a few lines of code, with the complexity of the business, you will soon find that you need to manually configure various middleware. Moreover, because this kind of web framework does not restrict the directory structure of the ...

Posted by andymt on Wed, 25 May 2022 18:10:42 +0300

node+koa2+mongodb build a RESTful API style background

RESTful API style Before developing, let's review what a RESTful API is? RESTful is an API design style, not a mandatory specification and standard. It is characterized by concise and clear requests and responses and strong readability. No matter what style the API belongs to, as long as it can meet the needs, it is enough. There is no absolute ...

Posted by powlouk on Mon, 02 May 2022 17:19:39 +0300

Step by step: handwritten Koa2

As I said before Koa2 from zero to scaffold , and From shallow to deep understanding of Koa2 source codeThis article explains how to write a Koa2Step 1: encapsulate HTTP service and create Koa constructorAfter reading the source code of Koa2, we learned that Koa's service application is based on the Node's native HTTP module, which is encapsula ...

Posted by pakmannen on Wed, 06 Apr 2022 05:04:35 +0300

From shallow to deep understanding of Koa2 source code

In the previous article, we introduced what is Basis of Koa2Briefly reviewWhat is koa2web development framework of NodeJSKoa can be seen as an abstraction of nodejs' HTTP moduleSource code focusMiddleware mechanismOnion modelcomposeSource code structureSource address of Koa2: https://github.com/koajs/koaAmong them, lib is its source codeAs you ...

Posted by peeter_talvistu on Tue, 05 Apr 2022 10:02:24 +0300