This is my personal website
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

use Deno's integrated HTTP server

+11 -20
-14
deno.lock
··· 12 12 } 13 13 }, 14 14 "remote": { 15 - "https://deno.land/std@0.190.0/_util/asserts.ts": "178dfc49a464aee693a7e285567b3d0b555dc805ff490505a8aae34f9cfb1462", 16 - "https://deno.land/std@0.190.0/async/abortable.ts": "fd682fa46f3b7b16b4606a5ab52a7ce309434b76f820d3221bdfb862719a15d7", 17 - "https://deno.land/std@0.190.0/async/deadline.ts": "58f72a3cc0fcb731b2cc055ba046f4b5be3349ff6bf98f2e793c3b969354aab2", 18 - "https://deno.land/std@0.190.0/async/debounce.ts": "adab11d04ca38d699444ac8a9d9856b4155e8dda2afd07ce78276c01ea5a4332", 19 - "https://deno.land/std@0.190.0/async/deferred.ts": "42790112f36a75a57db4a96d33974a936deb7b04d25c6084a9fa8a49f135def8", 20 - "https://deno.land/std@0.190.0/async/delay.ts": "73aa04cec034c84fc748c7be49bb15cac3dd43a57174bfdb7a4aec22c248f0dd", 21 - "https://deno.land/std@0.190.0/async/mod.ts": "f04344fa21738e5ad6bea37a6bfffd57c617c2d372bb9f9dcfd118a1b622e576", 22 - "https://deno.land/std@0.190.0/async/mux_async_iterator.ts": "70c7f2ee4e9466161350473ad61cac0b9f115cff4c552eaa7ef9d50c4cbb4cc9", 23 - "https://deno.land/std@0.190.0/async/pool.ts": "f1b8d3df4d7fd3c73f8cbc91cc2e8b8e950910f1eab94230b443944d7584c657", 24 - "https://deno.land/std@0.190.0/async/retry.ts": "c9248325ec08cc2cceb7618472e77589a51a25cee460e07b6096be34966c2ead", 25 - "https://deno.land/std@0.190.0/async/tee.ts": "47e42d35f622650b02234d43803d0383a89eb4387e1b83b5a40106d18ae36757", 26 - "https://deno.land/std@0.190.0/http/server.ts": "1b23463b5b36e4eebc495417f6af47a6f7d52e3294827a1226d2a1aab23d9d20", 27 15 "https://deno.land/std@0.192.0/fmt/colors.ts": "d67e3cd9f472535241a8e410d33423980bec45047e343577554d3356e1f0ef4e", 28 - "https://deno.land/std@0.218.2/async/delay.ts": "8e1d18fe8b28ff95885e2bc54eccec1713f57f756053576d8228e6ca110793ad", 29 - "https://deno.land/std@0.218.2/http/server.ts": "6dce295abc169d0956ae00432441331b3425afad4d79e8b3475739be2f04d614", 30 16 "https://deno.land/x/htm@0.2.1/html.tsx": "afcf0500d9199e8efe6877d9e7bf4f7907d0bba09906b6036cfe5e90458083b3", 31 17 "https://deno.land/x/htm@0.2.1/jsx.ts": "2dfbc2b208981b9348aee02494ba064eac72f686d2e5ecc19d7f3fcdb9734e3d", 32 18 "https://deno.land/x/htm@0.2.1/mod.ts": "d930056a7c8c645bea5f9c116d65bc309d12cfebafa8db98f7c406e1984caaec"
-1
deps.ts
··· 1 - export { serve } from "https://deno.land/std@0.218.2/http/server.ts"; 2 1 import html, { h } from "https://deno.land/x/htm@0.2.1/mod.ts"; 3 2 export { html, h }; 4 3 import dayjs from "npm:dayjs";
+11 -5
main.tsx
··· 1 1 /** @jsx h */ 2 - import { serve, html, h, cyan } from "./deps.ts"; 2 + import { html, h, cyan } from "./deps.ts"; 3 3 import { styles } from "./src/styles.ts"; 4 4 import { links } from "./src/links.ts"; 5 5 import { footer } from "./src/footer.tsx"; ··· 24 24 ), 25 25 }); 26 26 27 - serve(handler, { 28 - onListen: () => 29 - console.log(`Server started on ${cyan("http://localhost:8000")} 🚀`), 30 - }); 27 + const port = Deno.env.get("PORT") ? Number(Deno.env.get("PORT")) : 8000; 28 + 29 + Deno.serve( 30 + { 31 + port, 32 + onListen: () => 33 + console.log(`Server started on ${cyan(`http://localhost:${port}`)} 🚀`), 34 + }, 35 + handler 36 + );