NodeJs express app is not publishing on Azure

2019-06-14 07:51发布

问题:

I am new to azure cloud service. I want to publish nodejs (express) api on as azure nodejs cloud service. I follow below link to create express app in nodejs.

http://azure.microsoft.com/en-us/documentation/articles/cloud-services-nodejs-develop-deploy-express-app/

Above tutorial is very good. I am able to create express app and i run successfully on azure emulator.

Problem :- But when i publish on cloud it also published successfully (hope so) but when i am trying to open web-service URL , it gives me 500 Internal Server error.

Please help me to figure out this problem.

回答1:

It was create problem because of long path issue in windows system. My code is in E/TestCode/Azure/Sample so npm azure module installed inside sample folder so it creates long hierarchy path. So some module did not upload to Azure.

Solution :- I moved code to E drive and publish it and it works perfectly fine.