added dotnet sample

هذا الالتزام موجود في:
Chris Ayers
2022-04-06 11:14:18 -07:00
الأصل 3cf06f26cf
التزام 4c1d36a1bc
5 ملفات معدلة مع 68 إضافات و0 حذوفات

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();

عرض الملف

@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

عرض الملف

@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}

عرض الملف

@@ -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>

عرض الملف

@@ -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