Template
Vite + Hono + TanStack port of the Shopify storefront
Ports nextjs-templates/shopify-storefront to Vite, TanStack Router/Query, Tailwind v4 and Hono, without the AI store assistant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// 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;
|
||||
Reference in New Issue
Block a user