mirror of
https://github.com/reiyua/github-profile-trophy-reiyua-mirror.git
synced 2026-11-17 06:02:09 +11:00
Add dev_main.ts for local development
This commit is contained in:
parent
09d8f21989
commit
ba9cfeb051
1 changed files with 11 additions and 0 deletions
11
dev_main.ts
Normal file
11
dev_main.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { serve } from "https://deno.land/std@0.66.0/http/server.ts";
|
||||
import { Card } from "./src/card.ts";
|
||||
const s = serve({ port: 8080 });
|
||||
for await (const req of s) {
|
||||
req.respond(
|
||||
{
|
||||
body: new Card().render(),
|
||||
headers: new Headers({ "Content-Type": "image/svg+xml" }),
|
||||
},
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue