From 40175e625b19a776f346f8b097b9ebdd8de94243 Mon Sep 17 00:00:00 2001 From: Joshua Date: Wed, 14 Sep 2022 23:27:49 +0200 Subject: [PATCH] add more scripts --- scripts.yml | 12 ++++++++++++ scripts/ipv4.ts | 1 + scripts/s3.ts | 8 ++++++++ 3 files changed, 21 insertions(+) create mode 100644 scripts/ipv4.ts create mode 100644 scripts/s3.ts diff --git a/scripts.yml b/scripts.yml index 93a312e..83610cf 100644 --- a/scripts.yml +++ b/scripts.yml @@ -5,3 +5,15 @@ scripts: routes: desc: Generate the Routes used for the Project cmd: deno run --unstable --allow-write --allow-read --no-check --no-prompt --allow-env ./scripts/routes.ts + cache: + desc: Cache all Dependencies + cmd: deno cache --unstable ./src/index.ts + start: + desc: Start Dreamland in Prod Mode + cmd: deno run -A --unstable ./src/index.ts + funny: + desc: Send a Request to IPv4.party because it's funny + cmd: deno run --unstable --allow-net --no-check --no-prompt ./scripts/ipv4.ts + s3: + desc: Test S3 Module + cmd: deno run --unstable --allow-net --no-check --no-prompt ./scripts/s3.ts diff --git a/scripts/ipv4.ts b/scripts/ipv4.ts new file mode 100644 index 0000000..983f349 --- /dev/null +++ b/scripts/ipv4.ts @@ -0,0 +1 @@ +await fetch("https://api.ipv4.party/claim?name=lio.cat") \ No newline at end of file diff --git a/scripts/s3.ts b/scripts/s3.ts new file mode 100644 index 0000000..0156134 --- /dev/null +++ b/scripts/s3.ts @@ -0,0 +1,8 @@ +import { S3, S3Bucket } from "https://deno.land/x/s3@0.5.0/mod.ts"; + +const s3 = new S3({ + accessKeyID: Deno.env.get("AWS_ACCESS_KEY_ID")!, + secretKey: Deno.env.get("AWS_SECRET_ACCESS_KEY")!, + region: "us-east-1", + endpointURL: Deno.env.get("S3_ENDPOINT_URL"), +});