Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
title layout
Hono Discord Problem 1276699964776513628

@hono/discord/problem-1276699964776513628

https://discord.com/channels/1011308539819597844/1276699964776513628

Contents

Solution

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!",
  });
});

Setup

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

open http://localhost:8000