Skip to content

Commit

Permalink
stage2
Browse files Browse the repository at this point in the history
  • Loading branch information
tireymorris committed May 24, 2024
1 parent 40abb72 commit 200186f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions public/styles/uno.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
.m-0{margin:0;}
.h-8{height:2rem;}
.flex{display:flex;}
.flex-col{flex-direction:column;}
.cursor-pointer{cursor:pointer;}
.items-center{align-items:center;}
.justify-center{justify-content:center;}
Expand Down
19 changes: 15 additions & 4 deletions src/server.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
import { Hono } from "hono";
import { serveStatic } from "hono/bun";
import { logger } from "hono/logger";
import Layout from "./components/Layout.tsx";

const app = new Hono();

// app.use("/styles/*", serveStatic({ root: "./public/" }));

app.use("/styles/*", serveStatic({ root: "./public/" }));
app.use("*", logger());
app.get("/", (c) => c.text("Hello world!"));

app.get("/", (c) =>
c.html(
<html lang="en" hx-boost="true" hx-swap="outerHTML transition:true">
<head>
<title>🌊 hyperwave</title>
<link rel="stylesheet" href="/styles/uno.css" />
</head>
<body class="font-lato m-0 bg-blue-100 p-0 text-base flex flex-col items-center ">
<h1>🌊 welcome to hyperwave</h1>
</body>
</html>,
),
);

export default {
port: process.env.PORT || 1234,
Expand Down

0 comments on commit 200186f

Please sign in to comment.