Connect and Express utils Connect and Express utils express express

Connect and Express utils


the only more elegant way i came up with is (assuming express is inside your root "node_modules" folder):

require("express/node_modules/connect/lib/utils");

the node installation is on windows, node version 0.8.2


and a bit of extra information:

this way you don't need to know where you are in the path and be forced to use relative paths (./ or ../), this can be done on any file nesting level.

i put all my custom modules inside the root "node_modules" folder (i named my folder "custom_modules") and call them this way at any level of nesting:

require("custom_modules/mymodule/something")


If you want to access connect directly, I suggest you install connect as a dependency of your project, along with express. Then you can var utils = require('connect').utils.