From 42b31720d64aceaec953d6fcd26d18a4ed9833dc Mon Sep 17 00:00:00 2001 From: Grabowski Date: Thu, 31 Oct 2019 10:23:07 +0100 Subject: [PATCH] Add project files. --- Squirrowse.Client/Program.cs | 12 +++++ Squirrowse.Client/Squirrowse.Client.csproj | 8 +++ Squirrowse.Service/Program.cs | 26 ++++++++++ .../Properties/launchSettings.json | 30 +++++++++++ Squirrowse.Service/Squirrowse.Service.csproj | 11 ++++ Squirrowse.Service/Startup.cs | 51 +++++++++++++++++++ .../appsettings.Development.json | 9 ++++ Squirrowse.Service/appsettings.json | 10 ++++ Squirrowse.sln | 31 +++++++++++ 9 files changed, 188 insertions(+) create mode 100644 Squirrowse.Client/Program.cs create mode 100644 Squirrowse.Client/Squirrowse.Client.csproj create mode 100644 Squirrowse.Service/Program.cs create mode 100644 Squirrowse.Service/Properties/launchSettings.json create mode 100644 Squirrowse.Service/Squirrowse.Service.csproj create mode 100644 Squirrowse.Service/Startup.cs create mode 100644 Squirrowse.Service/appsettings.Development.json create mode 100644 Squirrowse.Service/appsettings.json create mode 100644 Squirrowse.sln diff --git a/Squirrowse.Client/Program.cs b/Squirrowse.Client/Program.cs new file mode 100644 index 0000000..88acb1c --- /dev/null +++ b/Squirrowse.Client/Program.cs @@ -0,0 +1,12 @@ +using System; + +namespace Squirrowse.Client +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Hello World!"); + } + } +} diff --git a/Squirrowse.Client/Squirrowse.Client.csproj b/Squirrowse.Client/Squirrowse.Client.csproj new file mode 100644 index 0000000..958d2f1 --- /dev/null +++ b/Squirrowse.Client/Squirrowse.Client.csproj @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp3.0 + + + diff --git a/Squirrowse.Service/Program.cs b/Squirrowse.Service/Program.cs new file mode 100644 index 0000000..367ed08 --- /dev/null +++ b/Squirrowse.Service/Program.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; + +namespace Squirrowse.Service +{ + public class Program + { + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }); + } +} diff --git a/Squirrowse.Service/Properties/launchSettings.json b/Squirrowse.Service/Properties/launchSettings.json new file mode 100644 index 0000000..8249223 --- /dev/null +++ b/Squirrowse.Service/Properties/launchSettings.json @@ -0,0 +1,30 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:59337", + "sslPort": 44365 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "weatherforecast", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "Squirrowse.Service": { + "commandName": "Project", + "launchBrowser": true, + "launchUrl": "weatherforecast", + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/Squirrowse.Service/Squirrowse.Service.csproj b/Squirrowse.Service/Squirrowse.Service.csproj new file mode 100644 index 0000000..d0114fa --- /dev/null +++ b/Squirrowse.Service/Squirrowse.Service.csproj @@ -0,0 +1,11 @@ + + + + netcoreapp3.0 + + + + + + + diff --git a/Squirrowse.Service/Startup.cs b/Squirrowse.Service/Startup.cs new file mode 100644 index 0000000..31e5ebb --- /dev/null +++ b/Squirrowse.Service/Startup.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; + +namespace Squirrowse.Service +{ + public class Startup + { + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + public IConfiguration Configuration { get; } + + // This method gets called by the runtime. Use this method to add services to the container. + public void ConfigureServices(IServiceCollection services) + { + services.AddControllers(); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + + app.UseHttpsRedirection(); + + app.UseRouting(); + + app.UseAuthorization(); + + app.UseEndpoints(endpoints => + { + endpoints.MapControllers(); + }); + } + } +} diff --git a/Squirrowse.Service/appsettings.Development.json b/Squirrowse.Service/appsettings.Development.json new file mode 100644 index 0000000..e203e94 --- /dev/null +++ b/Squirrowse.Service/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Debug", + "System": "Information", + "Microsoft": "Information" + } + } +} diff --git a/Squirrowse.Service/appsettings.json b/Squirrowse.Service/appsettings.json new file mode 100644 index 0000000..d9d9a9b --- /dev/null +++ b/Squirrowse.Service/appsettings.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*" +} diff --git a/Squirrowse.sln b/Squirrowse.sln new file mode 100644 index 0000000..ad1eacc --- /dev/null +++ b/Squirrowse.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29411.108 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Squirrowse.Service", "Squirrowse.Service\Squirrowse.Service.csproj", "{8C085621-BAAA-4E96-B027-561BC18751EE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Squirrowse.Client", "Squirrowse.Client\Squirrowse.Client.csproj", "{A523B8A9-958B-45EC-B5E4-54FDF08C1C5D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8C085621-BAAA-4E96-B027-561BC18751EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8C085621-BAAA-4E96-B027-561BC18751EE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8C085621-BAAA-4E96-B027-561BC18751EE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8C085621-BAAA-4E96-B027-561BC18751EE}.Release|Any CPU.Build.0 = Release|Any CPU + {A523B8A9-958B-45EC-B5E4-54FDF08C1C5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A523B8A9-958B-45EC-B5E4-54FDF08C1C5D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A523B8A9-958B-45EC-B5E4-54FDF08C1C5D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A523B8A9-958B-45EC-B5E4-54FDF08C1C5D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {1CC5C3B8-3825-4EB5-ACFF-73B4CAC8945D} + EndGlobalSection +EndGlobal