Simple, single-user event aggregation platform, for use in personal websites and other related places.
event-streaming single-user events event-aggregation
at develop 76 lines 1.7 kB view raw
1// ------------------------------------------------------------ 2// Imports & Initialization 3// ------------------------------------------------------------ 4 5import { Hono } from "hono"; 6 7const app = new Hono(); 8 9// ------------------------------------------------------------ 10// Endpoints 11// ------------------------------------------------------------ 12 13// Homepage 14app.get("/", (c) => 15 c.html(` 16 <style> 17 * { 18 margin: 0; 19 padding: 0; 20 box-sizing: border-box; 21 position: relative; 22 } 23 24 body { 25 padding: 60px; 26 27 background-color: #101014; 28 color: #fff; 29 font-family: Arial, sans-serif; 30 31 width: 100vw; 32 height: 100vh; 33 } 34 35 .d-flex { 36 display: flex; 37 flex-direction: row; 38 } 39 40 .flex-column { 41 flex-direction: column; 42 } 43 44 .flex-center { 45 justify-content: center; 46 align-items: center; 47 } 48 49 .w-full { 50 width: 100%; 51 } 52 53 .gap { 54 gap: 8px; 55 } 56 </style> 57 <div class="d-flex flex-column flex-center w-full gap"> 58 <h1>This is a Snowflake instance!</h1> 59 <div class="d-flex flex-column flex-center gap"> 60 <p>version: ${process.env.npm_package_version}</p> 61 <p>Runtime: Bun ${Bun.version}</p> 62 <p>Powered by <a href="https://tangled.org/thevoid.cafe/snowflake">Snowflake</a></p> 63 </div> 64 </div> 65`), 66); 67 68app.route("/events", (await import("./events")).default); 69app.route("/states", (await import("./states")).default); 70app.route("/services", (await import("./services")).default); 71 72// ------------------------------------------------------------ 73// Exports 74// ------------------------------------------------------------ 75 76export default app;