HonoH
Hono7mo ago
Joker

RPC can't get types

import { hc } from 'hono/client';
import type { AppType } from './index.js';

const c = hc<AppType>('http://localhost:3000');


import { Hono } from 'hono';
//import { prettyJSON } from 'hono/pretty-json';

const app = new Hono();

app.get('/health', (c) => {
    return c.json({ status: 'ok' });
});

export type AppType = typeof app;

//app.use(prettyJSON());
//app.use(logger());

export default app;
Hh6TAdh.png
Was this page helpful?