Having trouble deploying to Azure App Service

I have to manually run npm install mysql and npm start on the ssh in kudu, it runs fine, i can see the admin dashboard and i can log in with the credentials i created. But after an hour of without usage, the app will restart and I have to run npm install, npm start again. Why is it not persisting? What am I missing?

Anyone successfully deployed this into azure web app service?