Nope, this is done by design.
Categoría: NodeJs
How would you load module greet.js that is located in the same folder into the app.js file?
require(‘./greet.js’);
What is libuv and what does it do?
It’s C++ library that deals with events happening in the operating system.
Does greetA and greetB return the same Object? var greetA = require(‘./greet’); var greetB = require(‘./greet’); greet.js exports this: module.exports = new Greetr();
They are, because the required returns a cashed Object.
What is non-blocking?
Doing other things whiteout stopping your program from running.
What two types of events does Node.js have?
System Events
Do the lines below output the same stuff? module.exports exports
Nope, due to by reference exports module points to a new Object.
What does the fs module stand for?
File system