My question is what is the difference between http module and other modules in node.js . why is the http module not located in ./node_modules?
Where I can find the module?
The http module is provided by your installation of Node.js. It's what's known as a core module
You can view the source to them in the repo (or download them locally): https://github.com/nodejs/node/tree/master/lib
As of Node 18 you can reference core modules by prefixing them with node:, which ensures you don't load a dependency that shares the same name.
const http = require('node:http');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With