Skip to content

Commit

Permalink
Initial code commit (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinyoo authored Sep 3, 2024
1 parent 3cf2ba4 commit 884ea34
Show file tree
Hide file tree
Showing 46 changed files with 1,778 additions and 4 deletions.
389 changes: 389 additions & 0 deletions .editorconfig

Large diffs are not rendered by default.

91 changes: 89 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
## Get latest from `dotnet new gitignore`

# dotenv files
.env

# User-specific files
*.rsuser
Expand Down Expand Up @@ -57,11 +60,14 @@ dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/

# .NET Core
# .NET
project.lock.json
project.fragment.lock.json
artifacts/

# Tye
.tye/

# ASP.NET Scaffolding
ScaffoldingReadMe.txt

Expand Down Expand Up @@ -396,3 +402,84 @@ FodyWeavers.xsd

# JetBrains Rider
*.sln.iml
.idea/

##
## Visual studio for Mac
##


# globs
Makefile.in
*.userprefs
*.usertasks
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.tar.gz
tarballs/
test-results/

# Mac bundle stuff
*.dmg
*.app

# content below from: https://github.com/github/gitignore/blob/main/Global/macOS.gitignore
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# content below from: https://github.com/github/gitignore/blob/main/Global/Windows.gitignore
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

# Vim temporary swap files
*.swp
.azure
15 changes: 15 additions & 0 deletions ApiApp/ApiApp.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>6cece002-f00d-4146-bd68-eacb26235847</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.*" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.*" />
</ItemGroup>

</Project>
6 changes: 6 additions & 0 deletions ApiApp/ApiApp.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@ApiApp_HostAddress = http://localhost:5165

GET {{ApiApp_HostAddress}}/weatherforecast/
Accept: application/json

###
44 changes: 44 additions & 0 deletions ApiApp/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}

app.UseHttpsRedirection();

var summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};

app.MapGet("/weatherforecast", () =>
{
var forecast = Enumerable.Range(1, 5).Select(index =>
new WeatherForecast
(
DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
Random.Shared.Next(-20, 55),
summaries[Random.Shared.Next(summaries.Length)]
))
.ToArray();
return forecast;
})
.WithName("GetWeatherForecast")
.WithOpenApi();

app.Run();

record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary)
{
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
}
41 changes: 41 additions & 0 deletions ApiApp/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:5050",
"sslPort": 5051
}
},
"profiles": {
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:5051;http://localhost:5050",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5050",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
8 changes: 8 additions & 0 deletions ApiApp/appsettings.Development.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
9 changes: 9 additions & 0 deletions ApiApp/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}
34 changes: 34 additions & 0 deletions DotNetAppsOnAca.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApp", "WebApp\WebApp.csproj", "{D8BC1F02-C473-4502-99E8-3D2C561415CA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiApp", "ApiApp\ApiApp.csproj", "{CEAEB487-681C-40EE-BD25-4CE411261481}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FuncApp", "FuncApp\FuncApp.csproj", "{2E797EBF-7C9E-4AB2-A6DF-0FD033E25C54}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D8BC1F02-C473-4502-99E8-3D2C561415CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D8BC1F02-C473-4502-99E8-3D2C561415CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D8BC1F02-C473-4502-99E8-3D2C561415CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D8BC1F02-C473-4502-99E8-3D2C561415CA}.Release|Any CPU.Build.0 = Release|Any CPU
{CEAEB487-681C-40EE-BD25-4CE411261481}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CEAEB487-681C-40EE-BD25-4CE411261481}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CEAEB487-681C-40EE-BD25-4CE411261481}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CEAEB487-681C-40EE-BD25-4CE411261481}.Release|Any CPU.Build.0 = Release|Any CPU
{2E797EBF-7C9E-4AB2-A6DF-0FD033E25C54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2E797EBF-7C9E-4AB2-A6DF-0FD033E25C54}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E797EBF-7C9E-4AB2-A6DF-0FD033E25C54}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E797EBF-7C9E-4AB2-A6DF-0FD033E25C54}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
1 change: 1 addition & 0 deletions FuncApp/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
local.settings.json
Loading

0 comments on commit 884ea34

Please sign in to comment.