I'm working on some server-side javascript and I have some data that I want to keep sensitive, so it's in a non-public facing directory. Let's say I put it inside a function - how do I then call that function from within another javascript file?
Thanks to Quentin for pointing me towards the relevant documentation. The solution I ended up with is:
sensitive.js:
exports.data = "data";
app.js:
var sensitive = require('./sensitive');
var data = sensitive.data;