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
'use strict'; | |
const aws = require('aws-sdk'); | |
const uuidv1 = require('uuid/v1'); | |
const dynamoDbClient = new aws.DynamoDB.DocumentClient(); | |
module.exports.create = async event => { |
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
'use strict'; | |
const aws = require('aws-sdk'); | |
const dynamoDbClient = new aws.DynamoDB.DocumentClient(); | |
module.exports.delete = async event => { | |
const params = { | |
TableName: process.env.TABLE_NAME, |
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
'use strict'; | |
const aws = require('aws-sdk'); | |
const dynamoDbClient = new aws.DynamoDB.DocumentClient(); | |
module.exports.getAll = async event => { | |
const params = { | |
TableName: process.env.TABLE_NAME |
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
'use strict'; | |
const aws = require('aws-sdk'); | |
const dynamoDbClient = new aws.DynamoDB.DocumentClient(); | |
module.exports.getById = async event => { | |
var params = { | |
TableName: process.env.TABLE_NAME, |
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
'use strict'; | |
const aws = require('aws-sdk'); | |
const dynamoDbClient = new aws.DynamoDB.DocumentClient(); | |
module.exports.update = async event => { | |
const json = JSON.parse(event.body); |
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: ads-api | |
custom: | |
tableName: AdsTable | |
provider: | |
name: aws | |
runtime: nodejs10.x | |
region: eu-central-1 | |
profile: serverlessuser |
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
'use strict'; | |
const redis = require('redis'); | |
const redisClient = redis.createClient({ url: '//' + process.env.REDIS_ENDPOINT + ':6379' }); | |
module.exports.getAll = async event => { | |
const promise = new Promise((resolve, reject) => { | |
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
'use strict'; | |
const redis = require('redis'); | |
const redisClient = redis.createClient({ url: '//' + process.env.REDIS_ENDPOINT + ':6379' }); | |
module.exports.trigger = async event => { | |
const promise = new Promise((resolve, reject) => { |
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
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-stretch-slim AS base | |
WORKDIR /app | |
EXPOSE 80 | |
EXPOSE 443 | |
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-stretch AS build | |
WORKDIR /src | |
COPY ["K8SSampleAPI/K8SSampleAPI.csproj", "K8SSampleAPI/"] | |
RUN dotnet restore "K8SSampleAPI/K8SSampleAPI.csproj" | |
COPY . . |
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: Namespace | |
metadata: | |
name: development | |
labels: | |
name: development |