Steps to use koa2 to build services:
npm i koa-generator -g
koa2 server_name
cd server_name
npm i koa2-cors -S // solve cross domain
npm install
When we enable the koa2 framework to build services, use the command npm run dev, and the following error will be reported at this time:
Reason: npm version mismatch, npm requires version 6.X
Modification method
Then npm run dev service starts successfully
The above are the problems I encountered during the use process. If other friends have any questions, please leave a message in the comment area, thank you~~