title | layout |
---|---|
Hono Discord Problem 1276699964776513628 |
https://discord.com/channels/1011308539819597844/1276699964776513628
Provided solution here https://discord.com/channels/1011308539819597844/1276699964776513628/1277141663612928052
import { Hono, TypedResponse } from "hono";
interface Response<T> {
message: string;
data: T;
}
const app = new Hono();
app.get("/", (c): TypedResponse<Response<string>, 200> => {
return c.json({
message: "success",
data: "Hello Hono!",
});
});
To clone:
git clone https://github.com/rjoydip/oss-issue-fix-collection.git
cd oss-issue-fix-collection/hono/discord/1276699964776513628
To run:
deno task dev