Skip to content

This is a simple project to demonstrate the difference between the usage of top-level await using commonJS and ES Modules in NodeJS.

Notifications You must be signed in to change notification settings

Sachin712/topLevelAwait

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TopLevelAwait

This is a simple project to demonstrate the difference between the usage of top-level await using commonJS and ES Modules in NodeJS.

How to run this project

Jump into the folder that you want to test out. For example,

To test out ES Modules syntax execution:

  • cd into 'ES Modules' folder through your terminal
  • run node index_EMS.js

To test out CommonJS syntax execution:

  • cd into 'Common JS' folder through your terminal
  • remove line 3, "type": "module", from package.json
  • run node index.js

About

This is a simple project to demonstrate the difference between the usage of top-level await using commonJS and ES Modules in NodeJS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published