Pre-launch — Gluecron is in final validation. Public signups and git hosting for non-owner users open after launch review.
CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history

index.ts

Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.

index.tsBlame22 lines · 1 contributor
1deedc2Demo1import { Hono } from "hono";
2
3type Todo = { id: number; title: string; done: boolean };
4
5const app = new Hono();
6const todos: Todo[] = [
7 { id: 1, title: "Try GlueCron", done: false },
8 { id: 2, title: "Push a commit", done: false },
9];
10
11app.get("/health", (c) => c.json({ ok: true }));
12app.get("/todos", (c) => c.json(todos));
13
14app.post("/todos", async (c) => {
15 const body = await c.req.json<{ title?: string }>();
16 if (!body?.title) return c.json({ error: "title required" }, 400);
17 const todo: Todo = { id: todos.length + 1, title: body.title, done: false };
18 todos.push(todo);
19 return c.json(todo, 201);
20});
21
22export default app;