re: Using await/async in a Simple Script VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Henry I like your idea here. What are your thoughts on where this could be a bad coding pattern and also where this would be a good pattern to use?
 

I generally don't like to use this pattern except for initializing something like a database connection or something of the sort at the end of the script.


module.exports.runQuery = async query => {
    ....
}

(async () => {
    await initializeDatabase()
})()
code of conduct - report abuse