Answers for "express access static files in post request"

0

express access static files in post request

app.use(staticPath, function(req, res, next){
if ('POST' != req.method){
    next()
}else{
    req.method = 'GET'
    next()
}
})
app.use(staticPath, express.static('./static'))
Posted by: Guest on October-27-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language