app.js:
global.fs = require('fs');
require('./process.js').init();
process.js
// Do stuff with `fs`
fs.realpathSync(...); // etc.
Is it acceptable to save fs under global so that the code within process.js can access fs without having to re-require it?
Or is there some other way I should be doing this?