random bun scripts that dont fit anywhere else
1import { Elysia, file } from "elysia";
2import { capMiddleware } from "@cap.js/middleware-elysia";
3
4new Elysia()
5 .use(
6 capMiddleware({
7 token_validity_hours: 0, // how long the token is valid for
8 tokens_store_path: ".data/tokensList.json",
9 token_size: 1600, // token size in bytes
10 scoping: "scoped", // 'global' | 'scoped'
11 }),
12 )
13 .get("/", () => "Hello Elysia!")
14 .listen(3000);
15
16console.log("Server started on port 3000");
17console.log("http://localhost:3000");