go run . > output.png
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
const fs = require('fs') | |
const cloudformationSchema = require('@serverless/utils/cloudformation-schema') | |
const esbuild = require('esbuild') | |
const yaml = require('js-yaml') | |
const rimraf = require('rimraf') | |
const SERVERLESS_YML_PATH = './serverless.yml' | |
const OUT_DIR = './dist' | |
// ref: https://esbuild.github.io/api/#simple-options |
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
const aws4 = require('aws4') | |
const fetch = require('node-fetch') | |
const host = process.env.ELASTICSEARCH_ENDPOINT | |
module.exports.default = async function handler(event, context) { | |
const indexName = 'example' | |
const options = aws4.sign({ | |
host, |