aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--docs/dev/roadmap.md2
-rw-r--r--pkgs/server/src/index.test.ts12
3 files changed, 15 insertions, 3 deletions
diff --git a/README.md b/README.md
index 20da58d..46bfb35 100644
--- a/README.md
+++ b/README.md
@@ -38,12 +38,12 @@ pnpm dev
Create `.env` files in each app directory:
-```apps/server/.env
+```pkgs/server/.env
DATABASE_URL=postgresql://user:password@localhost:5432/kioku
JWT_SECRET=your-secret-key
```
-```apps/web/.env
+```pkgs/web/.env
PUBLIC_API_URL=http://localhost:3000
```
diff --git a/docs/dev/roadmap.md b/docs/dev/roadmap.md
index a273e85..59375aa 100644
--- a/docs/dev/roadmap.md
+++ b/docs/dev/roadmap.md
@@ -12,7 +12,7 @@
### Server Foundation
- [x] Initialize Hono app
- [x] Setup Vitest
-- [ ] Add simple test to test that Hono works
+- [x] Add simple test to test that Hono works
- [ ] Error handling middleware
- [ ] Logger middleware
diff --git a/pkgs/server/src/index.test.ts b/pkgs/server/src/index.test.ts
new file mode 100644
index 0000000..216e965
--- /dev/null
+++ b/pkgs/server/src/index.test.ts
@@ -0,0 +1,12 @@
+import { describe, expect, it } from "vitest";
+import { app } from "./index";
+
+describe("Hono app", () => {
+ describe("GET /api/health", () => {
+ it("returns ok status", async () => {
+ const res = await app.request("/api/health");
+ expect(res.status).toBe(200);
+ expect(await res.json()).toEqual({ status: "ok" });
+ });
+ });
+});