Reputation: 7866
I was following this article to deploy a simple node.js
web app to Azure.
Deplyment went fine - but when I visit the website - I get 403 You do not have permission to view this directory or page.
my node.js code:
var http = require('http')
var port = process.env.PORT || 1337;
http.createServer(function(req, res) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('Hello from azure\n');
}).listen(port);
Upvotes: 1
Views: 1839
Reputation: 4656
I think this might because of your directory structure. Maybe your server.js
file was located in a sub folder of your git repository. Could you check the deployment log from azure portal (just click the down-arrow icon besides your recent deployment). It should tell you azure detected this is a node app. And in your case it might be not.
Alternatively you can login the azure website scm portal, just navigate to the url https://[your-site].scm.azurewebsites.net/
, and your can see the folder/files deployed and check the structure.
HTH
Upvotes: 1