Quantcast
Channel: node.js require files globally - Stack Overflow
Browsing latest articles
Browse All 2 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 latest articles
Browse All 2 View Live