root 3bf41bf355 update | há 1 ano atrás | |
---|---|---|
.. | ||
.npmignore | há 1 ano atrás | |
.travis.yml | há 1 ano atrás | |
LICENSE.txt | há 1 ano atrás | |
README.md | há 1 ano atrás | |
index.js | há 1 ano atrás | |
package.json | há 1 ano atrás | |
test.js | há 1 ano atrás |
require.main.filename
is great for figuring out the entry
point for the current application. This can be combined with a module like
pkg-conf to, as if by magic, load
top-level configuration.
Unfortunately, require.main.filename
sometimes fails when an application is
executed with an alternative process manager, e.g., iisnode.
require-main-filename
is a shim that addresses this problem.
var main = require('require-main-filename')()
// use main as an alternative to require.main.filename.
ISC