Get Node.js entry point from package.json
Instead of just checking for app.js and server.js to determine if Azure Websites is hosting a node application, check for the existence of a package.json file and if it has a "main" section, use that value instead for the IISNode configuration. This will enable Node applications which have an entry point other than app.js or server.js to work out of the box without requiring users to create their own web.config file.
Hi Timothy, and thanks for your request. Daria from the PM team has added some info in the comments. I hope this will help you with your concern.
Jason Tremper commented
Thanks Daria. Does the package.json have to be in the root or is it possible to specify a package.json that is nested?
Daria Grigoriu commented
It is possible to specify a custom start page via package.json such as in the example below. This start command request will be recognized on git push to Azure Websites.
"start": "node test.js"