add more scripts

This commit is contained in:
Joshua 2022-09-14 23:27:49 +02:00
parent e47aadccb1
commit 40175e625b
3 changed files with 21 additions and 0 deletions

View file

@ -5,3 +5,15 @@ scripts:
routes: routes:
desc: Generate the Routes used for the Project 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 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

1
scripts/ipv4.ts Normal file
View file

@ -0,0 +1 @@
await fetch("https://api.ipv4.party/claim?name=lio.cat")

8
scripts/s3.ts Normal file
View file

@ -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"),
});