在Azure App Service(Linux)上运行的Node/Next/React App是否需要web.config文件? [英] Is the web.config file required for a Node/Next/React App running on Azure App Service (Linux)?

查看:81
本文介绍了在Azure App Service(Linux)上运行的Node/Next/React App是否需要web.config文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Azure上运行一个基本的Node/Next/React App.我读了许多博客/主题,每个人都说我需要将web.config文件放在项目的根目录下.我没有这个文件,但是到目前为止一切似乎都运行良好,所以我的问题来了:

  • 还需要吗?
  • 是否仅对Azure App Service(Windows)必需?
  • 我为什么需要它?
  • 文件的目的是什么?

您可以在这里找到我的存储库: https://github.com/ddon-90/原型

预先感谢

解决方案

web.config是一个配置文件,用于管理各种设置,这些设置定义了IIS服务器上托管的网站(通常是ASP.NET站点). >

此配置文件中可以存储许多重要设置.可以方便地存储在Web.config文件中的一些最常用配置是:

Database connections
Caching settings
Session States
Error Handling
Security
Configuration file looks lik

在Azure App Service中,应用程序设置是作为环境变量传递到应用程序代码的变量.对于Linux应用程序和自定义容器,App Service使用--env标志将应用程序设置传递给容器,以在容器中设置环境变量

对于ASP.NET和ASP.NET Core开发人员,在App Service中设置应用程序设置就像在Web.config或appsettings.json中进行设置一样.

I have a basic Node/Next/React App running on Azure. I read many blogs/threads and everyone say I need to place the web.config file at the root of my project. I do NOT have this file but everything seems to be running ok so far so here come my questions:

  • Is it still required?
  • Is it required only for Azure App Service (Windows)?
  • Why do I need it?
  • What's the purpose of the file?

You can find my repo here: https://github.com/ddon-90/tog-prototype

Thanks in advance

解决方案

A web.config is a configuration file which is used to manage various settings that define a website hosted on IIS sever (typically ASP.NET sites).

There are number of important settings that can be stored in this configuration file. Some of the most frequently used configurations, stored conveniently inside Web.config file are:

Database connections
Caching settings
Session States
Error Handling
Security
Configuration file looks lik

In Azure App Service, app settings are variables passed as environment variables to the application code. For Linux apps and custom containers, App Service passes app settings to the container using the --env flag to set the environment variable in the container

For ASP.NET and ASP.NET Core developers, setting app settings in App Service are like setting them in in Web.config or appsettings.json.

这篇关于在Azure App Service(Linux)上运行的Node/Next/React App是否需要web.config文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆