koa-router 匹配所有路径之后静态资源的路径会失效
访问静态资源 js.css也会返回hellow word
router.get('\.*', (ctx, next) => {
ctx.body= 'hellow word'
});
app.use(koaStatic(path.resolve(__dirname,'../static')));
koa-router 匹配所有路径之后静态资源的路径会失效
访问静态资源 js.css也会返回hellow word
router.get('\.*', (ctx, next) => {
ctx.body= 'hellow word'
});
app.use(koaStatic(path.resolve(__dirname,'../static')));
10 回答11.7k 阅读
2 回答3.2k 阅读✓ 已解决
2 回答4.3k 阅读✓ 已解决
3 回答1.9k 阅读✓ 已解决
2 回答1.7k 阅读✓ 已解决
4 回答2.5k 阅读✓ 已解决
5 回答3.8k 阅读