John-David Dalton teaches Stefan how to use ES modules in Node with the @std/esm package.
Topic: NodeJS โ Page 7
You can use process.mainModule or require.main to figure out what the entry level of a Node.js script is.
The
--check
flag of the Node.js executable can be used to quickly check JavaScript files for syntax errors without executing them.It's always good to know how much time code needs to be executed. Today I learned there is a more precise way than using the Date object.
I learned that the Node.js REPL has different modes to run in.