// The API surface. In dev, @hono/vite-dev-server mounts this inside Vite; in // production, server/node.ts serves it alongside the built client. import { Hono } from 'hono'; import { account } from './account'; const app = new Hono().basePath('/api'); app.route('/account', account); app.notFound((c) => c.json({ error: 'Not found' }, 404)); app.onError((err, c) => { console.error(err); return c.json({ error: 'Something went wrong. Please try again.' }, 500); }); export default app;