What does require('../') mean?

It requires the file index.js of the parent folder, which is this one: https://github.com/senchalabs/connect/blob/master/index.js


A folder can be used as a module if the folder contains any of the following files (in lookup order): package.json, index.js, or index.node.

In this case, the folder has a package.json file that, among some other things, states that the main file of the module is the index.js file in the same directory. So the require('../') call you asked about could be changed to require('../index.js').

See Node.js Documentation - Folders as Modules for more information.

Tags:

Node.Js