I am deploying a node webapp via the Azure CLI from my local source folder. I'm trying to understand how to get the node modules to get deployed. I can log into the deployed webapp, see the missing node_modules folder, and install them manually via this process:
browse: https://{app_name}.scm.azurewebsites.net/ > click: Bash > cd site/wwwroot > note there is no node_modules folder, despite there being package-lock.json and package.json! > npm ci > restart webapp
But the question is how to do this automatically from the deploy process. I am using 'az webapp up' from my local source folder to upload the webapp. It has a package-lock.json and a package.json as below:
{
...
"main": "index.js",
"dependencies": {
"express": "^4.17.1",
"socket.io": "~2.3.0"
},
"scripts": {
"start": "node index.js"
}
}