I am using Locomotive, and am wondering whether there is a way to access the connect
that belongs to the express
object somehow. Right now I am loading connect
via require
, and had to npm install --save connect
first to make that happen. How can I use the connect
that belongs to Express/Locomotive. Is that a bad idea? Should I just maintain my own dependency?
Asked
Active
Viewed 101 times
0

Dmitry Minkovsky
- 36,185
- 26
- 116
- 160
-
You could probably get it through `require('express/node_modules/connect')`, but why do you want to access it? – robertklep Jun 26 '13 at 06:40
1 Answers
1
Every time you use something like:
.use(express.cookieParser())
you are using the underlying connect methods, which have been extended by express. So, you don't need to install a separate copy of connect.

Dan Kohn
- 33,811
- 9
- 84
- 100