May 2018
Intermediate to advanced
492 pages
12h 3m
English
Generally speaking, the module name is a pathname, but with the file extension removed. Earlier, when we wrote require('./simple'), Node.js knew to add .js to the filename and load in simple.js. Similarly, Node.js would recognize simple.json or simple.node as the filename legitimately satisfying require('./simple').
There are three types of module identifiers: relative, absolute, and top-level:
Read now
Unlock full access