aboutsummaryrefslogtreecommitdiff
path: root/sandbox/testAppNevena/Back
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/testAppNevena/Back')
-rw-r--r--sandbox/testAppNevena/Back/.vs/Back/DesignTimeBuild/.dtbcache.v2bin0 -> 227 bytes
-rw-r--r--sandbox/testAppNevena/Back/.vs/Back/v16/.suobin0 -> 27648 bytes
-rw-r--r--sandbox/testAppNevena/Back/Back.sln25
-rw-r--r--sandbox/testAppNevena/Back/Back/Back.csproj11
-rw-r--r--sandbox/testAppNevena/Back/Back/Back.csproj.user11
-rw-r--r--sandbox/testAppNevena/Back/Back/Controllers/Kontroler.cs39
-rw-r--r--sandbox/testAppNevena/Back/Back/Program.cs26
-rw-r--r--sandbox/testAppNevena/Back/Back/Properties/launchSettings.json31
-rw-r--r--sandbox/testAppNevena/Back/Back/Startup.cs54
-rw-r--r--sandbox/testAppNevena/Back/Back/appsettings.Development.json9
-rw-r--r--sandbox/testAppNevena/Back/Back/appsettings.json10
11 files changed, 216 insertions, 0 deletions
diff --git a/sandbox/testAppNevena/Back/.vs/Back/DesignTimeBuild/.dtbcache.v2 b/sandbox/testAppNevena/Back/.vs/Back/DesignTimeBuild/.dtbcache.v2
new file mode 100644
index 00000000..dede50b4
--- /dev/null
+++ b/sandbox/testAppNevena/Back/.vs/Back/DesignTimeBuild/.dtbcache.v2
Binary files differ
diff --git a/sandbox/testAppNevena/Back/.vs/Back/v16/.suo b/sandbox/testAppNevena/Back/.vs/Back/v16/.suo
new file mode 100644
index 00000000..e204565c
--- /dev/null
+++ b/sandbox/testAppNevena/Back/.vs/Back/v16/.suo
Binary files differ
diff --git a/sandbox/testAppNevena/Back/Back.sln b/sandbox/testAppNevena/Back/Back.sln
new file mode 100644
index 00000000..1c86caa0
--- /dev/null
+++ b/sandbox/testAppNevena/Back/Back.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.32126.315
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Back", "Back\Back.csproj", "{A5D7A228-C92F-4B50-B692-9E2EF1690831}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {A5D7A228-C92F-4B50-B692-9E2EF1690831}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A5D7A228-C92F-4B50-B692-9E2EF1690831}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A5D7A228-C92F-4B50-B692-9E2EF1690831}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A5D7A228-C92F-4B50-B692-9E2EF1690831}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {7D3EEB8B-9652-4E81-A36D-7054FE085432}
+ EndGlobalSection
+EndGlobal
diff --git a/sandbox/testAppNevena/Back/Back/Back.csproj b/sandbox/testAppNevena/Back/Back/Back.csproj
new file mode 100644
index 00000000..28847161
--- /dev/null
+++ b/sandbox/testAppNevena/Back/Back/Back.csproj
@@ -0,0 +1,11 @@
+<Project Sdk="Microsoft.NET.Sdk.Web">
+
+ <PropertyGroup>
+ <TargetFramework>net5.0</TargetFramework>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
+ </ItemGroup>
+
+</Project>
diff --git a/sandbox/testAppNevena/Back/Back/Back.csproj.user b/sandbox/testAppNevena/Back/Back/Back.csproj.user
new file mode 100644
index 00000000..5ce319f6
--- /dev/null
+++ b/sandbox/testAppNevena/Back/Back/Back.csproj.user
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
+ <Controller_SelectedScaffolderCategoryPath>root/Common/Api</Controller_SelectedScaffolderCategoryPath>
+ <ActiveDebugProfile>Back</ActiveDebugProfile>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
+ <DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/sandbox/testAppNevena/Back/Back/Controllers/Kontroler.cs b/sandbox/testAppNevena/Back/Back/Controllers/Kontroler.cs
new file mode 100644
index 00000000..b533f55d
--- /dev/null
+++ b/sandbox/testAppNevena/Back/Back/Controllers/Kontroler.cs
@@ -0,0 +1,39 @@
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace Back.Controllers
+{
+ [Route("api/[controller]")]
+ [ApiController]
+ public class Kontroler : ControllerBase
+ {
+ // GET: api/<ValuesController>
+ /*[HttpGet]
+ public string Get()
+ {
+ return "";
+ }*/
+
+ // POST api/<ValuesController>
+ // string
+ [HttpPost]
+ public int Post([FromBody] Numbers num)
+ {
+ //return (num.a + num.b).ToString();
+ //Debug.WriteLine(num.a);
+ //return "syfugds";
+ return num.a + num.b;
+ }
+ }
+
+ public class Numbers
+ {
+ public int a { get; set; }
+ public int b { get; set; }
+
+ }
+}
diff --git a/sandbox/testAppNevena/Back/Back/Program.cs b/sandbox/testAppNevena/Back/Back/Program.cs
new file mode 100644
index 00000000..3efb8ac4
--- /dev/null
+++ b/sandbox/testAppNevena/Back/Back/Program.cs
@@ -0,0 +1,26 @@
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace Back
+{
+ 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<Startup>();
+ });
+ }
+}
diff --git a/sandbox/testAppNevena/Back/Back/Properties/launchSettings.json b/sandbox/testAppNevena/Back/Back/Properties/launchSettings.json
new file mode 100644
index 00000000..7e9682ce
--- /dev/null
+++ b/sandbox/testAppNevena/Back/Back/Properties/launchSettings.json
@@ -0,0 +1,31 @@
+{
+ "$schema": "http://json.schemastore.org/launchsettings.json",
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:57172",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "launchUrl": "swagger",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Back": {
+ "commandName": "Project",
+ "dotnetRunMessages": "true",
+ "launchBrowser": true,
+ "launchUrl": "swagger",
+ "applicationUrl": "http://localhost:5000",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ }
+ }
+}
diff --git a/sandbox/testAppNevena/Back/Back/Startup.cs b/sandbox/testAppNevena/Back/Back/Startup.cs
new file mode 100644
index 00000000..655f6f12
--- /dev/null
+++ b/sandbox/testAppNevena/Back/Back/Startup.cs
@@ -0,0 +1,54 @@
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+using Microsoft.OpenApi.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace Back
+{
+ 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();
+ services.AddCors(options => options.AddDefaultPolicy(builder => builder.WithOrigins("http://localhost:4200").AllowAnyHeader().AllowAnyMethod()));
+ }
+
+ // 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.UseSwagger();
+ //app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "Back v1"));
+ }
+
+ app.UseRouting();
+
+ app.UseAuthorization();
+ //
+ app.UseCors();
+ app.UseEndpoints(endpoints =>
+ {
+ endpoints.MapControllers();
+ });
+ }
+ }
+}
diff --git a/sandbox/testAppNevena/Back/Back/appsettings.Development.json b/sandbox/testAppNevena/Back/Back/appsettings.Development.json
new file mode 100644
index 00000000..8983e0fc
--- /dev/null
+++ b/sandbox/testAppNevena/Back/Back/appsettings.Development.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
+ }
+ }
+}
diff --git a/sandbox/testAppNevena/Back/Back/appsettings.json b/sandbox/testAppNevena/Back/Back/appsettings.json
new file mode 100644
index 00000000..d9d9a9bf
--- /dev/null
+++ b/sandbox/testAppNevena/Back/Back/appsettings.json
@@ -0,0 +1,10 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
+ }
+ },
+ "AllowedHosts": "*"
+}