// src/index.ts
import { Hono } from "hono";
import { serveStatic } from "hono/cloudflare-workers";
import Home from "./lib/templates/index.html";
import manifest from "__STATIC_CONTENT_MANIFEST";
const app = new Hono();
app.get("/static/*", serveStatic({ root: "./", manifest }));
app.get("/htmx.js", serveStatic({ path: "./htmx.js", manifest }));
app.get("/simple.css", serveStatic({ path: "./simple.css", manifest }));
app.get("/", (c) => {
return c.html(Home);
});
export default app;
import { Hono } from "hono";
import { serveStatic } from "hono/cloudflare-workers";
import Home from "./lib/templates/index.html";
import manifest from "__STATIC_CONTENT_MANIFEST";
const app = new Hono();
app.get("/static/*", serveStatic({ root: "./", manifest })); // This does NOT work...
// below get method should be typed individual files?
app.get("/htmx.js", serveStatic({ path: "./htmx.js", manifest }));
app.get("/simple.css", serveStatic({ path: "./simple.css", manifest }));
app.get("/", (c) => {
return c.html(Home);
});
export default app;
// src/index.ts
import { Hono } from "hono";
import { serveStatic } from "hono/cloudflare-workers";
import Home from "./lib/templates/index.html";
import manifest from "__STATIC_CONTENT_MANIFEST";
const app = new Hono();
app.get("/static/*", serveStatic({ root: "./", manifest }));
app.get("/htmx.js", serveStatic({ path: "./htmx.js", manifest }));
app.get("/simple.css", serveStatic({ path: "./simple.css", manifest }));
app.get("/", (c) => {
return c.html(Home);
});
export default app;
import { Hono } from "hono";
import { serveStatic } from "hono/cloudflare-workers";
import Home from "./lib/templates/index.html";
import manifest from "__STATIC_CONTENT_MANIFEST";
const app = new Hono();
app.get("/static/*", serveStatic({ root: "./", manifest })); // This does NOT work...
// below get method should be typed individual files?
app.get("/htmx.js", serveStatic({ path: "./htmx.js", manifest }));
app.get("/simple.css", serveStatic({ path: "./simple.css", manifest }));
app.get("/", (c) => {
return c.html(Home);
});
export default app;