diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d79a2f2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +################################################################################ +# This .gitignore file was automatically created by Microsoft(R) Visual Studio. +################################################################################ + +/Back/skydiveLogs-api/obj +/Back/.vs/skydiveLogs-api/v15 +/Back/skydiveLogs-api/bin \ No newline at end of file diff --git a/Back/skydiveLogs-api.sln b/Back/skydiveLogs-api.sln new file mode 100644 index 0000000..c14c6b1 --- /dev/null +++ b/Back/skydiveLogs-api.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.852 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "skydiveLogs-api", "skydiveLogs-api\skydiveLogs-api.csproj", "{0AC70CC2-CE52-4CD9-89D6-077800574360}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0AC70CC2-CE52-4CD9-89D6-077800574360}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0AC70CC2-CE52-4CD9-89D6-077800574360}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0AC70CC2-CE52-4CD9-89D6-077800574360}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0AC70CC2-CE52-4CD9-89D6-077800574360}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CA378047-8DB2-4317-8DEE-D834E9834CAA} + EndGlobalSection +EndGlobal diff --git a/Back/skydiveLogs-api/Controllers/ValuesController.cs b/Back/skydiveLogs-api/Controllers/ValuesController.cs new file mode 100644 index 0000000..d3a6e19 --- /dev/null +++ b/Back/skydiveLogs-api/Controllers/ValuesController.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; + +namespace skydiveLogs_api.Controllers +{ + [Route("api/[controller]")] + [ApiController] + public class ValuesController : ControllerBase + { + // GET api/values + [HttpGet] + public ActionResult> Get() + { + return new string[] { "value1", "value2" }; + } + + // GET api/values/5 + [HttpGet("{id}")] + public ActionResult Get(int id) + { + return "value"; + } + + // POST api/values + [HttpPost] + public void Post([FromBody] string value) + { + } + + // PUT api/values/5 + [HttpPut("{id}")] + public void Put(int id, [FromBody] string value) + { + } + + // DELETE api/values/5 + [HttpDelete("{id}")] + public void Delete(int id) + { + } + } +} diff --git a/Back/skydiveLogs-api/Program.cs b/Back/skydiveLogs-api/Program.cs new file mode 100644 index 0000000..c256952 --- /dev/null +++ b/Back/skydiveLogs-api/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 skydiveLogs_api +{ + 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/Back/skydiveLogs-api/Properties/launchSettings.json b/Back/skydiveLogs-api/Properties/launchSettings.json new file mode 100644 index 0000000..735da73 --- /dev/null +++ b/Back/skydiveLogs-api/Properties/launchSettings.json @@ -0,0 +1,30 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:51376", + "sslPort": 44344 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "api/values", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "skydiveLogs_api": { + "commandName": "Project", + "launchBrowser": true, + "launchUrl": "api/values", + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} \ No newline at end of file diff --git a/Back/skydiveLogs-api/Startup.cs b/Back/skydiveLogs-api/Startup.cs new file mode 100644 index 0000000..b27a628 --- /dev/null +++ b/Back/skydiveLogs-api/Startup.cs @@ -0,0 +1,48 @@ +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.Logging; +using Microsoft.Extensions.Options; + +namespace skydiveLogs_api +{ + 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.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); + } + + // 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(); + } + else + { + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); + } + + app.UseHttpsRedirection(); + app.UseMvc(); + } + } +} diff --git a/Back/skydiveLogs-api/appsettings.Development.json b/Back/skydiveLogs-api/appsettings.Development.json new file mode 100644 index 0000000..e203e94 --- /dev/null +++ b/Back/skydiveLogs-api/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Debug", + "System": "Information", + "Microsoft": "Information" + } + } +} diff --git a/Back/skydiveLogs-api/appsettings.json b/Back/skydiveLogs-api/appsettings.json new file mode 100644 index 0000000..def9159 --- /dev/null +++ b/Back/skydiveLogs-api/appsettings.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/Back/skydiveLogs-api/skydiveLogs-api.csproj b/Back/skydiveLogs-api/skydiveLogs-api.csproj new file mode 100644 index 0000000..084ae71 --- /dev/null +++ b/Back/skydiveLogs-api/skydiveLogs-api.csproj @@ -0,0 +1,14 @@ + + + + netcoreapp2.2 + InProcess + skydiveLogs_api + + + + + + + +