2025-01-02 15:33:37 +11:00
|
|
|
// main.ts
|
|
|
|
|
import { serve } from '@hono/node-server';
|
|
|
|
|
import { serveStatic } from '@hono/node-server/serve-static';
|
|
|
|
|
import handle from 'hono-react-router-adapter/node';
|
|
|
|
|
|
|
|
|
|
import server from '.';
|
|
|
|
|
import * as build from '../build/server';
|
|
|
|
|
|
|
|
|
|
server.use(
|
|
|
|
|
serveStatic({
|
|
|
|
|
root: './build/client',
|
|
|
|
|
}),
|
|
|
|
|
);
|
|
|
|
|
|
2025-02-07 16:33:30 +11:00
|
|
|
const handler = handle(build, server);
|
2025-01-02 15:33:37 +11:00
|
|
|
|
2025-02-04 22:25:11 +11:00
|
|
|
serve({ fetch: handler.fetch, port: 3000 });
|