There is likely more to that code later on.
According to this blog,
The code above uses utils.merge to give app all the functionality of the Connect http server prototype. This includes the .use, .handle, and .listen methods.
The app also merges EventEmitter from the node.js events library. EventEmitter is where app gets app.on and app.emit from.