I want to be able to install my package through npm and then run app.js with a custom command without using npm start. I have looked around the web and many examples show adding a line in scripts in the package.json file, but all of these require it to be run using npm start. Is there a way to execute a .js file with node using a custom command e.g. importer --file?
importer -filepackage.jsonhave the correctbinentry, as described here in the docs? I believe if you install the package globally this executable name automatically gets added to the same directory wherenpmandnpxare (they are done using this same method), and that directory should be in yourPATH.