From da6ec385a3979d7f38079665ebb7350cdad05e12 Mon Sep 17 00:00:00 2001 From: Nick Rirush Date: Tue, 5 Feb 2019 15:33:41 +0800 Subject: [PATCH] Initial commit --- .gitignore | 3 +++ Program.cs | 24 ++++++++++++++++++++++++ Properties/launchSettings.json | 32 ++++++++++++++++++++++++++++++++ QuickCHAT.csproj | 13 +++++++++++++ Startup.cs | 34 ++++++++++++++++++++++++++++++++++ appsettings.Development.json | 9 +++++++++ appsettings.json | 8 ++++++++ 7 files changed, 123 insertions(+) create mode 100644 .gitignore create mode 100644 Program.cs create mode 100644 Properties/launchSettings.json create mode 100644 QuickCHAT.csproj create mode 100644 Startup.cs create mode 100644 appsettings.Development.json create mode 100644 appsettings.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7098c41 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/.vscode/* +/bin/* +/obj/* \ No newline at end of file diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..5752681 --- /dev/null +++ b/Program.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; + +namespace QuickCHAT +{ + public class Program + { + public static void Main(string[] args) + { + CreateWebHostBuilder(args).Build().Run(); + } + + public static IWebHostBuilder CreateWebHostBuilder(string[] args) => + WebHost.CreateDefaultBuilder(args) + .UseStartup(); + } +} diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json new file mode 100644 index 0000000..86f40c3 --- /dev/null +++ b/Properties/launchSettings.json @@ -0,0 +1,32 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:23042", + "sslPort": 44378 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "QuickCHAT": { + "commandName": "Project", + "launchBrowser": true, + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "Production": { + "commandName": "Project", + "launchBrowser": false, + "applicationUrl": "https://localhost:8080;http://localhost:8443" + } + } +} \ No newline at end of file diff --git a/QuickCHAT.csproj b/QuickCHAT.csproj new file mode 100644 index 0000000..423afac --- /dev/null +++ b/QuickCHAT.csproj @@ -0,0 +1,13 @@ + + + + netcoreapp2.2 + InProcess + + + + + + + + diff --git a/Startup.cs b/Startup.cs new file mode 100644 index 0000000..54547b2 --- /dev/null +++ b/Startup.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.DependencyInjection; + +namespace QuickCHAT +{ + public class Startup + { + // This method gets called by the runtime. Use this method to add services to the container. + // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 + public void ConfigureServices(IServiceCollection services) + { + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IHostingEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + + app.Run(async (context) => + { + await context.Response.WriteAsync("Hello World!"); + }); + } + } +} diff --git a/appsettings.Development.json b/appsettings.Development.json new file mode 100644 index 0000000..e203e94 --- /dev/null +++ b/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Debug", + "System": "Information", + "Microsoft": "Information" + } + } +} diff --git a/appsettings.json b/appsettings.json new file mode 100644 index 0000000..def9159 --- /dev/null +++ b/appsettings.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Warning" + } + }, + "AllowedHosts": "*" +}