How to set root folder for Azure Websites?

My folder structure looks like this:

-build -unimportant stuff -src -scripts -thirdParty -knockout -knockout.js -jquery -jquery.js -business -application.js -index.html 

So basically I have all the site source code in the "src" folder, when I deploy it to Azure, I need to change the default page configuration to "src / index.html", which seems to work. My problem is that my scripts are not loading.

I have links to my scripts:

In my local environment, this works fine, but Azure does not have script access. It seems that although I am trying to use a relative path, Azure is trying to access scripts from its root directory, which is one level below where the scripts are located.

Does anyone know how to change the root directory of an Azure website to be installed as the "src" directory

+6
source share
1 answer

the solution is to go to β€œCustomize” in managing your Azure Website. In the "Application Settings" section, add the "Project" key and the value in my case is "./src", then start the deployment. Now only the directory you specify will be expanded, and it will be expanded as the root.

Full instructions can be found here: https://github.com/projectkudu/kudu/wiki/Customizing-deployments

+6
source

Source: https://habr.com/ru/post/954292/


All Articles