Wednesday, 15 July 2015

node.js - Best practices for using ExpressJS middleware across a number of different files in NodeJS app -


If I use useful middleware such as express.cookieParser (); and, like, dividing into my NodesJs application into different files is expected to be financially with their examples of being expressed. For example, if I use the var express = need ('express') , and again in many others, am I ruining the resources they receive and Instant me? Or do require a cache module, or (even better) make them a global example?

I know that the effect on the need for Express Express on multiple files will probably be negligible - this is more questions to help me understand how to load the module.

When you need a module twice, the second

Source: is required.

No comments:

Post a Comment