Skip to content

Commit ad4ffa4

Browse files
committed
fix ci
1 parent 0942a46 commit ad4ffa4

File tree

4 files changed

+25
-10
lines changed

4 files changed

+25
-10
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"check": "biome check"
1717
},
1818
"dependencies": {
19-
"@hono/node-server": "^1.9.0",
2019
"@hono/node-server": "^1.19.4",
2120
"@tailwindcss/vite": "^4.1.13",
2221
"@tanstack/react-devtools": "^0.7.0",

src/entry-server.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { cors } from "hono/cors";
1111
import { logger } from "hono/logger";
1212
import { createRouter } from "./router.tsx";
1313
import { handler as testHandler } from "./routes/-test.ts";
14+
import { setupApiRoutes } from "./routes/-api.ts";
1415
import "dotenv/config";
1516

1617
const port = process.env.NODE_SERVER_PORT
@@ -24,15 +25,8 @@ app.use(logger());
2425

2526
app.use(cors());
2627

27-
// Health check endpoint
28-
app.get("/api/health", (c) => {
29-
return c.json({
30-
status: "ok",
31-
timestamp: new Date().toISOString(),
32-
uptime: process.uptime(),
33-
environment: process.env.NODE_ENV || "development",
34-
});
35-
});
28+
// Setup API routes
29+
setupApiRoutes(app);
3630

3731
app.get("/test", testHandler);
3832

src/routes/-api.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import type { Hono } from "hono";
2+
3+
export const setupApiRoutes = (app: Hono) => {
4+
// Health check endpoint
5+
app.get("/api/health", (c) => {
6+
return c.json({
7+
status: "ok",
8+
timestamp: new Date().toISOString(),
9+
uptime: process.uptime(),
10+
environment: process.env.NODE_ENV || "development",
11+
});
12+
});
13+
14+
// Add more API routes here as needed
15+
};

src/routes/__root.test.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { describe, expect, it } from 'vitest'
2+
3+
describe('Root Route', () => {
4+
it('should pass placeholder test', () => {
5+
expect(true).toBe(true)
6+
})
7+
})

0 commit comments

Comments
 (0)