This file contains hidden or 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
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: my-k8s-api-deployment | |
namespace: development | |
spec: | |
replicas: 3 | |
template: | |
metadata: | |
labels: |
This file contains hidden or 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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: my-k8s-api-service | |
namespace: development | |
spec: | |
type: LoadBalancer | |
selector: | |
app: my-k8s-api | |
ports: |
This file contains hidden or 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
namespace AwsDotnetCsharp | |
{ | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.DependencyInjection; | |
public class Startup | |
{ | |
public void ConfigureServices(IServiceCollection services) |
This file contains hidden or 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
namespace AwsDotnetCsharp | |
{ | |
using Microsoft.AspNetCore.Hosting; | |
public class LambdaEntryPoint : Amazon.Lambda.AspNetCoreServer.APIGatewayProxyFunction | |
{ | |
protected override void Init(IWebHostBuilder builder) | |
{ | |
builder.UseStartup<Startup>(); | |
} |
This file contains hidden or 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
service: comments-api | |
provider: | |
name: aws | |
runtime: dotnetcore2.1 | |
region: eu-central-1 | |
profile: serverlessuser | |
apiKeys: | |
- CommentsAPIKey |
This file contains hidden or 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
namespace AwsDotnetCsharp.Controllers | |
{ | |
using AwsDotnetCsharp.Models; | |
using Microsoft.AspNetCore.Mvc; | |
[Route("api/[controller]")] | |
public class CommentsController : Controller | |
{ | |
[HttpGet] | |
public string Get() |
This file contains hidden or 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
namespace AwsDotnetCsharp.Models | |
{ | |
public class CommentsPostRequest | |
{ | |
public string Comment { get; set; } | |
} | |
} |
This file contains hidden or 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
namespace AwsDotnetCsharp | |
{ | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.DependencyInjection; | |
public class Startup | |
{ | |
public void ConfigureServices(IServiceCollection services) |
This file contains hidden or 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
namespace AwsDotnetCsharp.Models | |
{ | |
public class CommentsGetResponse | |
{ | |
public string Id { get; set; } | |
public string Comment { get; set; } | |
public string Language { get; set; } | |
} | |
} |
This file contains hidden or 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
namespace AwsDotnetCsharp.Models | |
{ | |
public class CommentsQueueRequest | |
{ | |
public string Id { get; set; } | |
public string Comment { get; set; } | |
} | |
} |