I get the error just when starting dev

I get the error just when starting dev mode no requests made. Let me start a thread with the code peices
4 Replies
Cyb3r-Jak3
Cyb3r-Jak3OP16mo ago
index.ts file
import { deleteStateHandler, getStateHandler, lockStateHandler, putStateHandler } from "./handlers";
import { Env } from "./types/env";
import { Hono } from "hono";

const app = new Hono<{ Bindings: Env }>()


app.get("/states/:projectName", getStateHandler)
app.post("/states/:projectName", putStateHandler)
app.delete("/states/:projectName", deleteStateHandler)
app.all("/states/:projectName/lock", lockStateHandler)
app.all("*", async (c) => {return c.text(c.req.url, 404);})


export default {
fetch: app.fetch
};
import { deleteStateHandler, getStateHandler, lockStateHandler, putStateHandler } from "./handlers";
import { Env } from "./types/env";
import { Hono } from "hono";

const app = new Hono<{ Bindings: Env }>()


app.get("/states/:projectName", getStateHandler)
app.post("/states/:projectName", putStateHandler)
app.delete("/states/:projectName", deleteStateHandler)
app.all("/states/:projectName/lock", lockStateHandler)
app.all("*", async (c) => {return c.text(c.req.url, 404);})


export default {
fetch: app.fetch
};
Cyb3r-Jak3
Cyb3r-Jak3OP16mo ago
Other files are too big to attaching
Unsmart
Unsmart16mo ago
I assume the error is because you dont export from the index.ts, you need to import and then re-export all DOs from index.ts
Cyb3r-Jak3
Cyb3r-Jak3OP16mo ago
That was it. Thanks!
Want results from more Discord servers?
Add your server