📜  在 post 请求中快速访问静态文件 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:12.355000             🧑  作者: Mango

代码示例1
app.use(staticPath, function(req, res, next){
if ('POST' != req.method){
    next()
}else{
    req.method = 'GET'
    next()
}
})
app.use(staticPath, express.static('./static'))