Given the code with async
async function wierdFunction(){
setTimeout(function(){
//background process that does not return
//Russian roulette
if ( Math.random() > 0.99 )
throw new Error('Bang!');
}, 3000);
}
I only need to call this function asynchronous, I don't need to know when it finished.
app.post('/wierd-endpoint', function (req,res){
wierdFunction();
res.json({status:"Running. Now, go away."});
});
Is there any advise against calling it without await
keyword?