NodeJS require all modules in one file, good practice?
问题 I am wondering if there is any downside, from a design or security point of view, having one file that requires() all the modules that I need, and then exports them. This would save me to keep track of all modules in every single file. Example: // my_requires.js const bodyParser = require('body-parser') const parseForm = bodyParser.urlencoded({extended: false}) const DOMPurify = require('dompurify'); const {JSDOM} = require('jsdom'); const jwt = require('jsonwebtoken'); const passport =