About
The main entry point in Node.
In a package
In a package, the main property in package.json defines the main script
How to get it at runtime ?
Because module provides a filename property (normally equivalent to __filename), the entry point of the current application can be obtained by checking require.main.filename