Link to file2
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
package any; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.HashSet; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Queue; | |
import java.util.Set; |
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
import express from 'express'; | |
import cors from 'cors'; | |
import helmet from 'helmet'; | |
import { rootHandler } from './root'; | |
export const app: express.Application = express(); | |
app.use(helmet()); | |
if (process.env.CORS) { |
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
require('source-map-support').install(); | |
import awsServerlessExpress from 'aws-serverless-express'; | |
import { app } from './server'; | |
const server = awsServerlessExpress.createServer(app); | |
exports.handler = (event: any, context: any): any => { | |
awsServerlessExpress.proxy(server, event, context); | |
}; |
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
/* eslint-disable @typescript-eslint/no-var-requires */ | |
const path = require('path'); | |
const PnpWebpackPlugin = require('pnp-webpack-plugin'); | |
module.exports = { | |
entry: './dist/src/lambda.js', | |
output: { | |
path: path.resolve(__dirname, 'distLambda'), | |
filename: 'lambda.js', | |
libraryTarget: 'umd', |
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
resource "aws_lambda_function" "main" { | |
function_name = var.lambda_name | |
filename = data.archive_file.empty_lambda.output_path | |
handler = "lambda.handler" | |
runtime = "nodejs12.x" | |
memory_size = 2048 | |
timeout = 900 |
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
resource "aws_api_gateway_integration" "lambda" { | |
rest_api_id = aws_api_gateway_rest_api.main.id | |
resource_id = aws_api_gateway_method.proxy.resource_id | |
http_method = aws_api_gateway_method.proxy.http_method | |
# Lambdas can only be invoked via Post - but the gateway will also forward GET requests etc. | |
integration_http_method = "POST" | |
type = "AWS_PROXY" | |
uri = aws_lambda_function.main.invoke_arn | |
} |
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
{ | |
"$schema": "./schemas/package.schema.json", | |
"name": "lambda-express", | |
"template": "lambda-express", | |
"templateVersion": "0.1.19", | |
"configuration": {}, | |
"deployments": [ | |
{ | |
"name": "prod", | |
"configuration": { |
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
{ | |
"users": [ | |
{ | |
"name": "awsUser", | |
"type": "apiKey", | |
"config": { | |
"awsAccessKeyId": "your secret", | |
"awsSecretAccessKey": "your access key", | |
"awsDefaultRegion": "us-west-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
const { configureSitemap } = require('@sergeymyssak/nextjs-sitemap'); | |
const Sitemap = configureSitemap({ | |
baseUrl: 'https://example.com', | |
exclude: ['/admin'], | |
excludeIndex: true, | |
pagesConfig: { | |
'/about': { | |
priority: '0.5', | |
changefreq: 'daily', |
OlderNewer