一、利用 koa-static 实现静态资源的访问 安装koa-static npm i koa-static 引入koa-static方法,并且传入静态资源目录路径 const Koa = require("koa"); const static = require("koa-static");