I have defined some functions in server/methods.js
which I use in some of my methods such as:
function randomIntFromInterval(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min);
}
If I want to use the functions in my methods, I have to place them in server/methods.js
. Why can't I place the functions in lib/utils.js
? I thought that files in lib/
would be called first, so functions there would be accessible in all other files.