zone plans are separate from workers plan
zone plans are separate from workers plan
Cannot find module '__STATIC_CONTENT_MANIFEST' or its corresponding type declarations.ts(2307)



env.d.ts with the content:root part? Does it just 404?http://127.0.0.1:8787/static/htmx.js returns 404 Not Found./static/htmx.js which fails. You should try root: /http://127.0.0.1:8787/htmx.js it now fails and sends 404 Not Foundhttp://127.0.0.1:8787/static/htmx.js does the same thing, 404 Not Found./*500 Internal Server Error lolArrayBuffers, then are streamed out as a ReadableStream to your Worker, which is why it is fastest. A value stored as a string can still retrieve be retrieved as a ReadableStream.delete calls fail if the key doesn't exist/was auto-expired?wrangler dev uses local KV namespaces by default. These can be shared with other local instances, but will not affect the KV Namespaces in the cloud--persist-to to ensure they are both pushing their data to the same directorykv:bulk put on local dev?--local to the command// src/index.ts
import { Hono } from "hono";
import { serveStatic } from "hono/cloudflare-workers";
import Home from "./templates/index.html";
import manifest from "__STATIC_CONTENT_MANIFEST"; //Cannot find module '__STATIC_CONTENT_MANIFEST' or its corresponding type declarations.ts(2307)
const app = new Hono();
app.get("/static/*", serveStatic({ root: "./", manifest }));
app.get("/htmx.js", serveStatic({ path: "./htmx.js", manifest }));
app.get("/", (c) => {
return c.html(Home);
});
export default app;#wrangler.toml
name = "hono-htmx"
compatibility_date = "2023-12-01"
main = "src/index.ts"
[site]
bucket = "./assets"declare module '__STATIC_CONTENT_MANIFEST' {
const manifest: string
export default manifest
}//custom.d.ts
declare module "__STATIC_CONTENT_MANIFEST" {
const content: string;
export default content;
}// 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;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);
});app.get("/*", serveStatic({ root: "./", manifest }));var cache = await c.env.CACHE.get('key' + uuid, { type: "stream" });
if(cache && !reset) {
console.log('Cached', sql)
return new Response(cache, { status: 200, headers: { "Content-Type": "application/json" } });
}