This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
using Swashbuckle.AspNetCore.Swagger; | |
namespace ElGuerre.Taskin.Api | |
{ | |
public class Startup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add Swagger | |
services.AddSwaggerGen(options => | |
{ | |
options.SwaggerDoc("v1", | |
new Info | |
{ | |
Version = "v1", | |
Title = "Taskin API", | |
Description = "API to expose Taskin logic", | |
TermsOfService = "https://github.com/juanluelguerre/Taskin/blob/master/LICENSE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.UseSwagger() | |
.UseSwaggerUI(c => | |
{ | |
c.SwaggerEndpoint("/swagger/v1/swagger.json", "Taskin V1"); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var host = new WebHostBuilder() | |
.UseKestrel() | |
.UseIISIntegration() | |
.UseContentRoot(Directory.GetCurrentDirectory()) | |
.UseStartup<Startup>() | |
.ConfigureAppConfiguration((context, configBuilder) => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ProjectsController( | |
IProjectService service, | |
ILogger<ProjectsController> logger) | |
{ | |
_service = service; | |
_logger = logger; | |
} | |
[HttpGet] | |
public async Task<ActionResult<IEnumerable<ProjectModel>>> GetAll() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Serilog": { | |
"MinimumLevel": "Information", | |
"WriteTo": [ | |
{ | |
"Name": "Async", | |
"Args": { | |
"configure": [ | |
{ | |
"Name": "Console", | |
"Args": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SETLOCAL | |
IF [%1]==[] SET SOLUTION_NAME=ElGuerre.Taskin.Api.sln | |
IF NOT [%1]==[] SET SOLUTION_NAME=%1 | |
IF [%2]==[] SET TEST_PROJECT=./test/ElGuerre.Taskin.Api.Tests/ElGuerre.Taskin.Api.Tests.csproj | |
IF NOT [%2]==[] SET TEST_PROJECT=%2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear | |
TOKEN=$(<sonar.token) | |
if [ -z "$1" ] | |
then | |
SLN="ElGuerre.Taskin.Api.sln" | |
else | |
SLN="$1" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal | |
set /p TOKEN=<sonar.token | |
IF [%1]==[] SET SLN="./ElGuerre.Taskin.Api.sln" | |
IF NOT [%1]==[] SET SLN=%1 | |
dotnet build-server shutdown | |
del .\.sonarqube /S /Q |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo rm -rf /usr/local/share/dotnet/sdk/#VERSION# | |
sudo rm -rf /usr/local/share/dotnet/shared/Microsoft.NETCore.App/#VERSION# | |
sudo rm -rf /usr/local/share/dotnet/shared/Microsoft.AspNetCore.App/#VERSION# | |
sudo rm -rf /usr/local/share/dotnet/host/fxr/#VERSION# |
OlderNewer