I am creating an app with nodejs. In the app, I have a `app.js` script that is the entrypoint that initializes both the app, as an expressjs app, and the http server that I use.

**Just to clarify:** modules here are not npm modules, they are my own files. I've written the app in modules. They are just seperate script files used by `require()`-ing them.

This app has several modules that a main module handler initializes. It reads the contents of a folder, which contains my own modules, and then by convention call the `.initialize` on each module after running a `require()` call on the filenames without the `.js` extension.

However, I have 1 module that needs the `app` variable to create an endpoint, and 1 module that needs the `httpServer` variable to create a web socket. Both of these are instansiated in `app.js`.

Seeing as I don't know what kind of modules will be in the folder, I don't really want to send `app` and `httpServer` to every module if they are just needed by 1 module each. Something like dependency injection would fit nice, but is that possible without to much overhead?

Right now I just temporarily added `app` and `httpServer` to the `GLOBAL` object.