How can I use async/await at the top level?
I have been going over async
/await
and after going over several articles, I decided to test things myself. However, I can’t seem to wrap my head around why this does not work:
How to export a module with async/await – Nodejs
I’m trying to export a module with async await. Tried other online solutions but none of is working for me. Looking for better solution (within db.js file) if possible.