0

I have a webapp running on Azure using a MEAN stack, with AngularJS V1.4.3 and Node V6.9.1. The Node version is correctly set in the Azure environment variable (acknowledged in Azure console with 'node -v') and the application runs ok except when I try to display a login form errors. My package.json config is:

 "dependencies": {
    "body-parser": "^1.10.2",
    "cookie-parser": "^1.3.5",
    "debug": "^2.1.3",
    "express": "^4.11.2",
    "express-jwt": "^3.4.0",
    "jade": "^1.9.2",
    "jsonwebtoken": "^5.7.0",
    "mongoose": "^4.6.6",
    "morgan": "^1.5.3",
    "nodemailer": "^2.6.4",
    "passport": "^0.2.2",
    "passport-local": "^1.0.0",
    "serve-favicon": "^2.2.1"
  }

I send back my errors from Node controller to the Angular UI like this:

 res.status(401).json(errorMessage);
or 
    res.status(400).json(errorMessage);

On my local computers (several), all in Visual Studio 2015, with file encoding Codepage 65001 (French characters, UTF-8 without signature), the errors are rendered correctly.

I have uploaded the project files to my Azure space and, when I run the site and expect the login errors, these are not displayed (no exception thrown, but no text). The browser's console log says that the {{variable}} in html view is undefined. Otherwise, the uploaded site on Azure works ok.

Thanks for help

Sa E Chowdary
  • 2,075
  • 15
  • 31
Ginger Opariti
  • 1,282
  • 5
  • 23
  • 41

1 Answers1

0

Got it, I had just to edit the web.config file as well described here: Windows Azure Websites is overriding my 404 and 500 error pages in my node.js app

Community
  • 1
  • 1
Ginger Opariti
  • 1,282
  • 5
  • 23
  • 41