require node modules at the file beginning
问题 I had a habit of requiring all my node modules in the beginning of the app.js file. var express=require('express'), bodyParser = require( 'body-parser' ), cookieParser = require( 'cookie-parser' ), compression = require( 'compression' ), . . But some modules are used for single jobs in a single function, so I can remove those from the beginning and place them inline. var express=require('express'), bodyParser = require( 'body-parser' ), cookieParser = require( 'cookie-parser' ), compression =