Answer the question
In order to leave comments, you need to log in
How, who, implements the connection of modules?
Hello everyone, I was interested in such a question, maybe someone will throw off links to interesting articles or share their experience. That's the point. Let's say there is such a module - 1
exports.modul1= function () {
console.log("New modul1")
}
const m = require('./modul1');
m.modul1()
exports.modul2= function () {
console.log("New modul2")
}
const m = require('./modul1');
m.modul1()
exports.modul3= function () {
console.log("New modul3")
}
const m1 = require('./modul1');
const m2 = require('./modul2');
const m3 = require('./modul2');
m2.modul2( m1 )
m3.modul3( m1 )
Answer the question
In order to leave comments, you need to log in
Everything is well described here)
https://medium.com/@lazlojuly/are-node-js-modules-...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question