路径:server/app.js

const path = require('path');
const serve = require('koa-static');
const main = serve(path.join(__dirname));
app.use(main);
//读取静态资源

nodejs中安装包

npm i koa-static -s
作者 铁血 汉子 24 天前
2018/06/23/12:21:00pm 2018/5/30/11:12:34
0 57