Click here to Skip to main content
15,886,840 members
Articles / Web Development / Node.js

NodeJS Await is Only Valid in Async Function

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
31 Jul 2021CPOL2 min read 27K  
Implement a “top-level” async function in Node when there is no async main method

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Australia Australia
G'day guys! My name is Jason, and I'm a backend software engineer living in Sydney, Australia. I enjoy blogging, playing chess and travelling.

Comments and Discussions