一:koa-static的使用:app
// __dirname:當前文件路徑 app.use(koaStatic('static',{ maxage:1000*5, //設置返回頭的maxage字段 extensions:['.txt','.png'], // 當請求路徑沒有後綴時,默認使用此數據中匹配成功的第一個, index:'logo', //當省略請求路徑文件時,默認的請求名稱 default file name gzip:true, //defaults to true, defer:false, hidden:false, setHeader:false, }));//相對路徑(相對根目錄的路徑) // app.use(koaStatic(__dirname,'../static'));//絕對路徑,此種方式該如何傳遞參數配置?? // 未完??