feat: initialize .NET 8 solution with project structure
This commit is contained in:
28
.gitignore
vendored
Normal file
28
.gitignore
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# .NET
|
||||||
|
bin/
|
||||||
|
obj/
|
||||||
|
*.user
|
||||||
|
*.suo
|
||||||
|
*.DotSettings
|
||||||
|
|
||||||
|
# Go
|
||||||
|
Agent/bin/
|
||||||
|
Agent/pkg/proto/*.go
|
||||||
|
|
||||||
|
# Node/Frontend
|
||||||
|
Frontend/node_modules/
|
||||||
|
Frontend/dist/
|
||||||
|
|
||||||
|
# IDE
|
||||||
|
.vs/
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
*.swp
|
||||||
|
|
||||||
|
# OS
|
||||||
|
Thumbs.db
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# Secrets
|
||||||
|
*.env
|
||||||
|
appsettings.*.local.json
|
||||||
48
Backend/NexusRMM.sln
Normal file
48
Backend/NexusRMM.sln
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.0.31903.59
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{46A7DE80-2925-4198-A823-18775C37F88E}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NexusRMM.Api", "src\NexusRMM.Api\NexusRMM.Api.csproj", "{E4C44F38-A4BA-4655-BEC1-53C22AAB0EF4}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NexusRMM.Core", "src\NexusRMM.Core\NexusRMM.Core.csproj", "{D70E9E9F-4207-4246-A5A6-AE9D6D63BA82}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NexusRMM.Infrastructure", "src\NexusRMM.Infrastructure\NexusRMM.Infrastructure.csproj", "{8DFB0C4E-8524-4801-BCAC-0087AA85AA07}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NexusRMM.Protos", "src\NexusRMM.Protos\NexusRMM.Protos.csproj", "{6699EE25-888A-4A24-BDED-56FFC521C2C2}"
|
||||||
|
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
|
||||||
|
{E4C44F38-A4BA-4655-BEC1-53C22AAB0EF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{E4C44F38-A4BA-4655-BEC1-53C22AAB0EF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{E4C44F38-A4BA-4655-BEC1-53C22AAB0EF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{E4C44F38-A4BA-4655-BEC1-53C22AAB0EF4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{D70E9E9F-4207-4246-A5A6-AE9D6D63BA82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{D70E9E9F-4207-4246-A5A6-AE9D6D63BA82}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{D70E9E9F-4207-4246-A5A6-AE9D6D63BA82}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{D70E9E9F-4207-4246-A5A6-AE9D6D63BA82}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{8DFB0C4E-8524-4801-BCAC-0087AA85AA07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{8DFB0C4E-8524-4801-BCAC-0087AA85AA07}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{8DFB0C4E-8524-4801-BCAC-0087AA85AA07}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{8DFB0C4E-8524-4801-BCAC-0087AA85AA07}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{6699EE25-888A-4A24-BDED-56FFC521C2C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{6699EE25-888A-4A24-BDED-56FFC521C2C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{6699EE25-888A-4A24-BDED-56FFC521C2C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{6699EE25-888A-4A24-BDED-56FFC521C2C2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(NestedProjects) = preSolution
|
||||||
|
{E4C44F38-A4BA-4655-BEC1-53C22AAB0EF4} = {46A7DE80-2925-4198-A823-18775C37F88E}
|
||||||
|
{D70E9E9F-4207-4246-A5A6-AE9D6D63BA82} = {46A7DE80-2925-4198-A823-18775C37F88E}
|
||||||
|
{8DFB0C4E-8524-4801-BCAC-0087AA85AA07} = {46A7DE80-2925-4198-A823-18775C37F88E}
|
||||||
|
{6699EE25-888A-4A24-BDED-56FFC521C2C2} = {46A7DE80-2925-4198-A823-18775C37F88E}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace NexusRMM.Api.Controllers;
|
||||||
|
|
||||||
|
[ApiController]
|
||||||
|
[Route("[controller]")]
|
||||||
|
public class WeatherForecastController : ControllerBase
|
||||||
|
{
|
||||||
|
private static readonly string[] Summaries = new[]
|
||||||
|
{
|
||||||
|
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||||||
|
};
|
||||||
|
|
||||||
|
private readonly ILogger<WeatherForecastController> _logger;
|
||||||
|
|
||||||
|
public WeatherForecastController(ILogger<WeatherForecastController> logger)
|
||||||
|
{
|
||||||
|
_logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet(Name = "GetWeatherForecast")]
|
||||||
|
public IEnumerable<WeatherForecast> Get()
|
||||||
|
{
|
||||||
|
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
|
||||||
|
{
|
||||||
|
Date = DateTime.Now.AddDays(index),
|
||||||
|
TemperatureC = Random.Shared.Next(-20, 55),
|
||||||
|
Summary = Summaries[Random.Shared.Next(Summaries.Length)]
|
||||||
|
})
|
||||||
|
.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
16
Backend/src/NexusRMM.Api/NexusRMM.Api.csproj
Normal file
16
Backend/src/NexusRMM.Api/NexusRMM.Api.csproj
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\NexusRMM.Core\NexusRMM.Core.csproj" />
|
||||||
|
<ProjectReference Include="..\NexusRMM.Infrastructure\NexusRMM.Infrastructure.csproj" />
|
||||||
|
<ProjectReference Include="..\NexusRMM.Protos\NexusRMM.Protos.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
20
Backend/src/NexusRMM.Api/Program.cs
Normal file
20
Backend/src/NexusRMM.Api/Program.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
|
// Add services to the container.
|
||||||
|
|
||||||
|
builder.Services.AddControllers();
|
||||||
|
|
||||||
|
var app = builder.Build();
|
||||||
|
|
||||||
|
// Configure the HTTP request pipeline.
|
||||||
|
if (app.Environment.IsDevelopment())
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
app.UseHttpsRedirection();
|
||||||
|
|
||||||
|
app.UseAuthorization();
|
||||||
|
|
||||||
|
app.MapControllers();
|
||||||
|
|
||||||
|
app.Run();
|
||||||
31
Backend/src/NexusRMM.Api/Properties/launchSettings.json
Normal file
31
Backend/src/NexusRMM.Api/Properties/launchSettings.json
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||||
|
"iisSettings": {
|
||||||
|
"windowsAuthentication": false,
|
||||||
|
"anonymousAuthentication": true,
|
||||||
|
"iisExpress": {
|
||||||
|
"applicationUrl": "http://localhost:54495",
|
||||||
|
"sslPort": 44321
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"profiles": {
|
||||||
|
"NexusRMM.Api": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"dotnetRunMessages": true,
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "swagger",
|
||||||
|
"applicationUrl": "https://localhost:7115;http://localhost:5231",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"IIS Express": {
|
||||||
|
"commandName": "IISExpress",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "swagger",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
12
Backend/src/NexusRMM.Api/WeatherForecast.cs
Normal file
12
Backend/src/NexusRMM.Api/WeatherForecast.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
namespace NexusRMM.Api;
|
||||||
|
|
||||||
|
public class WeatherForecast
|
||||||
|
{
|
||||||
|
public DateTime Date { get; set; }
|
||||||
|
|
||||||
|
public int TemperatureC { get; set; }
|
||||||
|
|
||||||
|
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||||
|
|
||||||
|
public string? Summary { get; set; }
|
||||||
|
}
|
||||||
8
Backend/src/NexusRMM.Api/appsettings.Development.json
Normal file
8
Backend/src/NexusRMM.Api/appsettings.Development.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft.AspNetCore": "Warning"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
Backend/src/NexusRMM.Api/appsettings.json
Normal file
9
Backend/src/NexusRMM.Api/appsettings.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft.AspNetCore": "Warning"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowedHosts": "*"
|
||||||
|
}
|
||||||
5
Backend/src/NexusRMM.Core/Class1.cs
Normal file
5
Backend/src/NexusRMM.Core/Class1.cs
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
namespace NexusRMM.Core;
|
||||||
|
public class Class1
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
9
Backend/src/NexusRMM.Core/NexusRMM.Core.csproj
Normal file
9
Backend/src/NexusRMM.Core/NexusRMM.Core.csproj
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
5
Backend/src/NexusRMM.Infrastructure/Class1.cs
Normal file
5
Backend/src/NexusRMM.Infrastructure/Class1.cs
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
namespace NexusRMM.Infrastructure;
|
||||||
|
public class Class1
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\NexusRMM.Core\NexusRMM.Core.csproj" />
|
||||||
|
<ProjectReference Include="..\NexusRMM.Protos\NexusRMM.Protos.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
5
Backend/src/NexusRMM.Protos/Class1.cs
Normal file
5
Backend/src/NexusRMM.Protos/Class1.cs
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
namespace NexusRMM.Protos;
|
||||||
|
public class Class1
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
10
Backend/src/NexusRMM.Protos/NexusRMM.Protos.csproj
Normal file
10
Backend/src/NexusRMM.Protos/NexusRMM.Protos.csproj
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
||||||
|
</Project>
|
||||||
Reference in New Issue
Block a user