Quantcast
Channel: node.js require files globally - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by FSeidl for node.js require files globally

You should require the module inside the module where you need it. In your case the line var variable = require(folder/file); should be inside folder2/file2 and not your init.js file.

View Article


node.js require files globally

I have a problem which i would like to get help with here on stackoverflow.In my node.js project i have a init.js file which i want to do the followingpseudo codevar variable =...

View Article

Browsing all 2 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>