Skip to content

Instantly share code, notes, and snippets.

@sj82516
Created July 20, 2020 08:23
Show Gist options
  • Save sj82516/1227bb95de39c2d9d65a3c0fb4b715b8 to your computer and use it in GitHub Desktop.
Save sj82516/1227bb95de39c2d9d65a3c0fb4b715b8 to your computer and use it in GitHub Desktop.
Nodejs Dependency Circulation
module.exports = {
data: "This is a",
};
const b = require('./b.js');
console.log(b.data);
module.exports = {
data: "This is b",
};
const a = require('./a.js');
console.log(a.data);
const a = require('./a');
const b = require('./b');
console.log('This is main', a);
console.log('This is main', b);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment