Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 139833

Where should i put async and await?

$
0
0

Where should i put async and await? result is work2 work1

app.post('/upload', (req, res) => {
    const txtupload = multer().any()
    let validate = true
    txtupload(req,res, (err)=>{
        console.log('work1')
        validate = false
    })

    if(validate){
        console.log('work2')
        //code
    }
});

Viewing all articles
Browse latest Browse all 139833

Trending Articles