mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-15 02:20:38 +09:00
Add API server with routes, services, and middleware
Express server with CRUD routes for agents, goals, issues, projects, and activity log. Includes validation middleware, structured error handling, request logging, and health check endpoint with tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
948e8e8c94
commit
c9d7cbfe44
24 changed files with 624 additions and 0 deletions
15
server/src/__tests__/health.test.ts
Normal file
15
server/src/__tests__/health.test.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { describe, it, expect } from "vitest";
|
||||
import express from "express";
|
||||
import request from "supertest";
|
||||
import { healthRoutes } from "../routes/health.js";
|
||||
|
||||
describe("GET /health", () => {
|
||||
const app = express();
|
||||
app.use("/health", healthRoutes());
|
||||
|
||||
it("returns 200 with status ok", async () => {
|
||||
const res = await request(app).get("/health");
|
||||
expect(res.status).toBe(200);
|
||||
expect(res.body).toEqual({ status: "ok" });
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue