Skip to content

Instantly share code, notes, and snippets.

@naoki-sawada
Last active September 4, 2018 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naoki-sawada/eae43a69dc18c3c42edb6e7ef498e8af to your computer and use it in GitHub Desktop.
Save naoki-sawada/eae43a69dc18c3c42edb6e7ef498e8af to your computer and use it in GitHub Desktop.
Use async await without function
(async () => {
try {
await createConnection();
console.log("connected!");
} catch (e) {
console.error(e);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment