update architecture diagram
This commit is contained in:
parent
efc53d484e
commit
6d34c9cda2
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 170 KiB After Width: | Height: | Size: 199 KiB |
2889
architecture.svg
2889
architecture.svg
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 413 KiB After Width: | Height: | Size: 435 KiB |
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
This is a CDK / AWS Lambda project for the publish dictionary function
|
This is a CDK / AWS Lambda project for the publish dictionary function
|
||||||
|
|
||||||
|
The AWS Lambda function needs to be put behind an API Gateway with a custom domain `functions.lingdocs.com`.
|
||||||
|
|
||||||
The `cdk.json` file tells the CDK Toolkit how to execute your app.
|
The `cdk.json` file tells the CDK Toolkit how to execute your app.
|
||||||
|
|
||||||
## Useful commands
|
## Useful commands
|
||||||
|
|
|
@ -14,12 +14,16 @@ import {
|
||||||
import { uploader } from "../lib/uploader";
|
import { uploader } from "../lib/uploader";
|
||||||
import { S3Client } from "@aws-sdk/client-s3";
|
import { S3Client } from "@aws-sdk/client-s3";
|
||||||
import { getEnv } from "../lib/env-helper";
|
import { getEnv } from "../lib/env-helper";
|
||||||
|
import { cors } from "hono/cors";
|
||||||
// import { getWordList } from "../lib/word-list-maker";
|
// import { getWordList } from "../lib/word-list-maker";
|
||||||
// import { Types as T } from "@lingdocs/inflect";
|
// import { Types as T } from "@lingdocs/inflect";
|
||||||
// const allWordsJsonFilename = "all-words-dictionary2.json";
|
// const allWordsJsonFilename = "all-words-dictionary2.json";
|
||||||
|
|
||||||
const app = new Hono();
|
const app = new Hono();
|
||||||
|
|
||||||
|
app.use(
|
||||||
|
cors({ origin: ["https://dictionary.lingdocs.com"], credentials: true })
|
||||||
|
);
|
||||||
app.get("/publish", async (c) => {
|
app.get("/publish", async (c) => {
|
||||||
// check if caller is authorized as lingdocs admin
|
// check if caller is authorized as lingdocs admin
|
||||||
// might be nicer to abstract this into some middleware
|
// might be nicer to abstract this into some middleware
|
||||||
|
|
Loading…
Reference in New Issue