-
-
Save TooTallNate/3364320 to your computer and use it in GitHub Desktop.
Recursive require crashes node
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = foo; | |
require('./index.js')(); | |
function foo(){ | |
console.log('foo.js', Date.now() ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = index; | |
require('./foo.js')(); | |
function index(){ | |
console.log('index.js', Date.now()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How can I do this:
module.exports = index;