node-require-main-filename

shim for require.main.filename() that works in as many environments as possible

Description

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.

Node.js is an event-based server-side JavaScript engine.

Upload more screenshots

Please help extend the collection of screenshots. Just make a screenshot and upload it here. You don't need to register or anything.

Upload a screenshot

Hint: upload an image here from your clipboard with Ctrl-V


Homepage

https://github.com/yargs/require-main-filename


Install this software package

If the package is available for the distribution you are currently using on your computer then install the software by clicking on…

Install node-require-main-filename