Currently, I am attempting to deploy an Express server on Typescript on Azure by following the guidelines provided in this tutorial: https://learn.microsoft.com/en-us/azure/app-service/quickstart-nodejs?tabs=windows&pivots=development-environment-vscode
The application is a simple dummy app with a basic "Hello World" in an index.ts file. However, I am encountering several issues during the deployment process.
Upon trying to access the website, the message I receive is: "You do not have permission to view this directory or page."
Upon inspecting the deployed folder, I noticed that there is no web.config file present. Despite setting the "SCM_DO_BUILD_DURING_DEPLOYMENT" parameter to true, it fails to generate the file.
Below is an excerpt from my package.json file:
{
"name": "test-azure-3",
"version": "1.0.0",
"description": "",
"main": "dist/index.js",
"scripts": {
"prebuild": "tslint -c tslint.json -p tsconfig.json --fix",
"build": "tsc",
"prestart": "npm run build",
"start": "node .",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.17.2"
},
"devDependencies": {
"@types/express": "^4.17.13",
"@types/node": "^17.0.14",
"tslint": "^6.1.3",
"typescript": "^4.5.5"
}
}
Here are my settings in Azure:
https://i.sstatic.net/rdGIW.png
https://i.sstatic.net/m5PxI.png
(I find it a bit unexpected to see .Net as the stack)
If you require any additional information, please feel free to ask!
EDIT: Following Felipe's suggestion, I went ahead and created a separate Azure project for the dist folder, but unfortunately, the issue persists.