added dotnet sample
هذا الالتزام موجود في:
6
dotnet-sample/Program.cs
Normal file
6
dotnet-sample/Program.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
var app = builder.Build();
|
||||
|
||||
app.MapGet("/", () => "Hello World!");
|
||||
|
||||
app.Run();
|
8
dotnet-sample/appsettings.Development.json
Normal file
8
dotnet-sample/appsettings.Development.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
9
dotnet-sample/appsettings.json
Normal file
9
dotnet-sample/appsettings.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
10
dotnet-sample/dotnet-sample.csproj
Normal file
10
dotnet-sample/dotnet-sample.csproj
Normal file
@@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>dotnet_sample</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
35
dotnet-sample/iac/main.bicep
Normal file
35
dotnet-sample/iac/main.bicep
Normal file
@@ -0,0 +1,35 @@
|
||||
param webAppName string = uniqueString(resourceGroup().id) // Generate unique String for web app name
|
||||
param sku string = 'S1' // The SKU of App Service Plan
|
||||
param location string = resourceGroup().location // Location for all resources
|
||||
param linuxFxVersion string = 'DOTNETCORE|6.0' // The runtime stack of web app
|
||||
|
||||
var appServicePlanName = toLower('AppServicePlan-FeatureFlags')
|
||||
var webSiteName = toLower('wapp-${webAppName}')
|
||||
|
||||
|
||||
resource appServicePlan 'Microsoft.Web/serverfarms@2020-06-01' = {
|
||||
name: appServicePlanName
|
||||
location: location
|
||||
sku: {
|
||||
name: sku
|
||||
}
|
||||
kind: 'linux'
|
||||
properties: {
|
||||
reserved: true
|
||||
}
|
||||
}
|
||||
|
||||
resource appService 'Microsoft.Web/sites@2020-06-01' = {
|
||||
name: webSiteName
|
||||
location: location
|
||||
kind: 'app'
|
||||
properties: {
|
||||
serverFarmId: appServicePlan.id
|
||||
siteConfig: {
|
||||
linuxFxVersion: linuxFxVersion
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
output webAppName string = appService.name
|
المرجع في مشكلة جديدة
حظر مستخدم