Can someone tell me what is happening here?I only know that it is requiring some core modules.
var inherits = require('util').inherits;
var express = require('express')();
Can someone tell me what is happening here?I only know that it is requiring some core modules.
var inherits = require('util').inherits;
var express = require('express')();
The util module has exported an object that contains (probably amongst others) a function under the key inherits:
exports = {
    inherits: function() ...
}
The express module on the other hand, has directly exported a whole function, and that function is immediately invoked and the result assigned to the variable express.
module.exports = exports = function() {
    return ...
}
It is likely that the function has also returned an object containing key/value pairs of functions, just like you'd get from a normal exports object.
See also What is the purpose of Node.js module.exports and how do you use it?