Blame · Line-by-line history
app.tsx
Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.
| 79136bb | 1 | import { Hono } from "hono"; |
| 2 | import { logger } from "hono/logger"; | |
| 3 | import { cors } from "hono/cors"; | |
| 05b973e | 4 | import { compress } from "hono/compress"; |
| 79136bb | 5 | import { Layout } from "./views/layout"; |
| 80bed05 | 6 | import { reportError } from "./lib/observability"; |
| 3ef4c9d | 7 | import { requestContext } from "./middleware/request-context"; |
| 8 | import { rateLimit } from "./middleware/rate-limit"; | |
| 79136bb | 9 | import gitRoutes from "./routes/git"; |
| 10 | import apiRoutes from "./routes/api"; | |
| 45e31d0 | 11 | import apiV2Routes from "./routes/api-v2"; |
| 12 | import apiDocsRoutes from "./routes/api-docs"; | |
| 79136bb | 13 | import authRoutes from "./routes/auth"; |
| 14 | import settingsRoutes from "./routes/settings"; | |
| 7298a17 | 15 | import settings2faRoutes from "./routes/settings-2fa"; |
| 79136bb | 16 | import issueRoutes from "./routes/issues"; |
| 17 | import repoSettings from "./routes/repo-settings"; | |
| 23d1a81 | 18 | import collaboratorRoutes from "./routes/collaborators"; |
| 04f6b7f | 19 | import teamCollaboratorRoutes from "./routes/team-collaborators"; |
| 20 | import invitesRoutes from "./routes/invites"; | |
| 21 | import liveEventsRoutes from "./routes/live-events"; | |
| 79136bb | 22 | import compareRoutes from "./routes/compare"; |
| 0074234 | 23 | import pullRoutes from "./routes/pulls"; |
| 24 | import editorRoutes from "./routes/editor"; | |
| c81ab7a | 25 | import forkRoutes from "./routes/fork"; |
| 26 | import webhookRoutes from "./routes/webhooks"; | |
| 27 | import exploreRoutes from "./routes/explore"; | |
| 28 | import tokenRoutes from "./routes/tokens"; | |
| 43de941 | 29 | import contributorRoutes from "./routes/contributors"; |
| 699e5c7 | 30 | import healthRoutes from "./routes/health-probe"; |
| 31 | import healthDashboardRoutes from "./routes/health"; | |
| 2316be6 | 32 | import statusRoutes from "./routes/status"; |
| 80bed05 | 33 | import helpRoutes from "./routes/help"; |
| b0148e9 | 34 | import marketingRoutes from "./routes/marketing"; |
| 5f2e749 | 35 | import pricingRoutes from "./routes/pricing"; |
| 5618f9a | 36 | import seoRoutes from "./routes/seo"; |
| 05cdb85 | 37 | import versionRoutes from "./routes/version"; |
| f295f78 | 38 | import { platformStatus } from "./routes/platform-status"; |
| 52ad8b1 | 39 | import publicStatsRoutes from "./routes/public-stats"; |
| 40 | import demoRoutes from "./routes/demo"; | |
| 16b325c | 41 | import insightRoutes from "./routes/insights"; |
| f1ab587 | 42 | import dashboardRoutes from "./routes/dashboard"; |
| 36b4cbd | 43 | import legalRoutes from "./routes/legal"; |
| bdbd0de | 44 | import importRoutes from "./routes/import"; |
| 14c3cc8 | 45 | import importBulkRoutes from "./routes/import-bulk"; |
| 46 | import migrationRoutes from "./routes/migrations"; | |
| 47 | import specsRoutes from "./routes/specs"; | |
| 79136bb | 48 | import webRoutes from "./routes/web"; |
| 0316dbb | 49 | import hookRoutes from "./routes/hooks"; |
| 50 | import eventsRoutes from "./routes/events"; | |
| 51 | import passkeyRoutes from "./routes/passkeys"; | |
| 52 | import oauthRoutes from "./routes/oauth"; | |
| 53 | import developerAppsRoutes from "./routes/developer-apps"; | |
| 54 | import themeRoutes from "./routes/theme"; | |
| 55 | import auditRoutes from "./routes/audit"; | |
| 56 | import reactionRoutes from "./routes/reactions"; | |
| 57 | import savedReplyRoutes from "./routes/saved-replies"; | |
| 58 | import deploymentRoutes from "./routes/deployments"; | |
| 59 | import orgRoutes from "./routes/orgs"; | |
| 60 | import notificationRoutes from "./routes/notifications"; | |
| 61 | import onboardingRoutes from "./routes/onboarding"; | |
| 62 | import adminRoutes from "./routes/admin"; | |
| 63 | import advisoriesRoutes from "./routes/advisories"; | |
| 64 | import aiChangelogRoutes from "./routes/ai-changelog"; | |
| 65 | import aiExplainRoutes from "./routes/ai-explain"; | |
| 66 | import aiTestsRoutes from "./routes/ai-tests"; | |
| 67 | import askRoutes from "./routes/ask"; | |
| 68 | import billingRoutes from "./routes/billing"; | |
| 6778ad2 | 69 | import stripeWebhookRoutes from "./routes/stripe-webhook"; |
| 0316dbb | 70 | import codeScanningRoutes from "./routes/code-scanning"; |
| 71 | import commitStatusesRoutes from "./routes/commit-statuses"; | |
| 72 | import copilotRoutes from "./routes/copilot"; | |
| 73 | import depUpdaterRoutes from "./routes/dep-updater"; | |
| 74 | import depsRoutes from "./routes/deps"; | |
| 75 | import discussionsRoutes from "./routes/discussions"; | |
| 76 | import environmentsRoutes from "./routes/environments"; | |
| 77 | import followsRoutes from "./routes/follows"; | |
| 78 | import gatesRoutes from "./routes/gates"; | |
| 79 | import gistsRoutes from "./routes/gists"; | |
| 80 | import graphqlRoutes from "./routes/graphql"; | |
| 2c2163e | 81 | import mcpRoutes from "./routes/mcp"; |
| 0316dbb | 82 | import marketplaceRoutes from "./routes/marketplace"; |
| 83 | import mergeQueueRoutes from "./routes/merge-queue"; | |
| 84 | import mirrorsRoutes from "./routes/mirrors"; | |
| 85 | import orgInsightsRoutes from "./routes/org-insights"; | |
| 86 | import packagesRoutes from "./routes/packages"; | |
| 87 | import packagesApiRoutes from "./routes/packages-api"; | |
| 88 | import pagesRoutes from "./routes/pages"; | |
| 89 | import projectsRoutes from "./routes/projects"; | |
| 90 | import protectedTagsRoutes from "./routes/protected-tags"; | |
| 91 | import pwaRoutes from "./routes/pwa"; | |
| 46d6165 | 92 | import installRoutes from "./routes/install"; |
| 0316dbb | 93 | import releasesRoutes from "./routes/releases"; |
| 94 | import requiredChecksRoutes from "./routes/required-checks"; | |
| 95 | import rulesetsRoutes from "./routes/rulesets"; | |
| 96 | import searchRoutes from "./routes/search"; | |
| 97 | import semanticSearchRoutes from "./routes/semantic-search"; | |
| 98 | import signingKeysRoutes from "./routes/signing-keys"; | |
| 99 | import sponsorsRoutes from "./routes/sponsors"; | |
| 100 | import ssoRoutes from "./routes/sso"; | |
| 46d6165 | 101 | import githubOauthRoutes from "./routes/github-oauth"; |
| 0316dbb | 102 | import symbolsRoutes from "./routes/symbols"; |
| 103 | import templatesRoutes from "./routes/templates"; | |
| 104 | import trafficRoutes from "./routes/traffic"; | |
| 105 | import wikisRoutes from "./routes/wikis"; | |
| 106 | import workflowsRoutes from "./routes/workflows"; | |
| 5ff9cc2 | 107 | import workflowArtifactsRoutes from "./routes/workflow-artifacts"; |
| 108 | import workflowSecretsRoutes from "./routes/workflow-secrets"; | |
| 46d6165 | 109 | import sleepModeRoutes from "./routes/sleep-mode"; |
| 52ad8b1 | 110 | import vsGithubRoutes from "./routes/vs-github"; |
| 59b6fb2 | 111 | import { authRateLimit, gitRateLimit, searchRateLimit } from "./middleware/rate-limit"; |
| 112 | import { csrfToken, csrfProtect } from "./middleware/csrf"; | |
| 79136bb | 113 | |
| 2316901 | 114 | import type { AuthEnv } from "./middleware/auth"; |
| 115 | ||
| 116 | const app = new Hono<AuthEnv>(); | |
| 79136bb | 117 | |
| 3ef4c9d | 118 | // Request context (request ID, start time) runs before everything else |
| 119 | app.use("*", requestContext); | |
| 05b973e | 120 | // Middleware — compression first (wraps all responses) |
| 121 | app.use("*", compress()); | |
| 122 | // Logger only on non-git routes to avoid overhead on clone/push | |
| 123 | app.use("*", async (c, next) => { | |
| 124 | if (c.req.path.includes(".git/")) return next(); | |
| 125 | return logger()(c, next); | |
| 126 | }); | |
| 79136bb | 127 | app.use("/api/*", cors()); |
| 290ea77 | 128 | |
| 36cc17a | 129 | // Force-revalidate HTML on every request — kills browser cache holding stale |
| 290ea77 | 130 | // pre-redesign markup. JSON / static assets keep their own cache rules; only |
| 131 | // text/html responses get the no-cache stamp. Without this, every push to | |
| 132 | // main left users staring at cached 80s-looking pages from before the design | |
| 133 | // landed. | |
| 36cc17a | 134 | // |
| 135 | // We deliberately use `private, no-cache, must-revalidate` rather than | |
| 136 | // `no-store`. `no-store` disables Safari/Chrome's back-forward cache (bfcache), | |
| 137 | // which makes every Back/Forward press a cold server round-trip — that | |
| 138 | // contributed to the "every nav feels like a fresh login" UX complaint. | |
| 139 | // `no-cache` still revalidates on direct fetch but lets bfcache hold the | |
| 140 | // page in memory between navigations. | |
| 290ea77 | 141 | app.use("*", async (c, next) => { |
| 142 | await next(); | |
| 143 | const ct = c.res.headers.get("content-type") || ""; | |
| 144 | if (ct.startsWith("text/html")) { | |
| 36cc17a | 145 | c.header("cache-control", "private, no-cache, must-revalidate"); |
| 290ea77 | 146 | } |
| 147 | }); | |
| 3ef4c9d | 148 | // Rate-limit API + auth endpoints (generous default) |
| 0316dbb | 149 | app.use("/api/*", rateLimit(120, 60_000, "api")); |
| 150 | app.use("/login", rateLimit(20, 60_000, "login")); | |
| 151 | app.use("/register", rateLimit(10, 60_000, "register")); | |
| 79136bb | 152 | |
| 59b6fb2 | 153 | // CSRF protection — set token on all requests, validate on mutations |
| 154 | app.use("*", csrfToken); | |
| 155 | app.use("*", csrfProtect); | |
| 156 | ||
| 45e31d0 | 157 | // Rate limit auth routes |
| 158 | app.use("/login", authRateLimit); | |
| 159 | app.use("/register", authRateLimit); | |
| 160 | ||
| 59b6fb2 | 161 | // Rate limit git operations |
| 162 | app.use("/:owner/:repo.git/*", gitRateLimit); | |
| 163 | ||
| 164 | // Rate limit search | |
| 165 | app.use("/:owner/:repo/search", searchRateLimit); | |
| 166 | app.use("/explore", searchRateLimit); | |
| 79136bb | 167 | |
| 168 | // Git Smart HTTP protocol routes (must be before web routes) | |
| 169 | app.route("/", gitRoutes); | |
| 170 | ||
| 45e31d0 | 171 | // REST API v1 (legacy) |
| 79136bb | 172 | app.route("/", apiRoutes); |
| 173 | ||
| 52ad8b1 | 174 | // Block L3 — /demo + /api/v2/demo/* live demo endpoints. Mounted BEFORE |
| 175 | // apiV2Routes so the /api/v2/demo/* JSON endpoints win over the v2 base | |
| 176 | // router's catch-shape, and BEFORE adminRoutes so the live /demo page | |
| 177 | // wins over the legacy /demo redirect in src/routes/admin.tsx. | |
| 178 | app.route("/", demoRoutes); | |
| 179 | ||
| 0316dbb | 180 | // REST API v2 (basePath /api/v2) |
| 181 | app.route("/", apiV2Routes); | |
| 182 | ||
| ad6d4ad | 183 | // Inbound API hooks (GateTest callback + backup PAT-authed /api/v1/gate-runs) |
| 184 | app.route("/", hookRoutes); | |
| 21f8dbd | 185 | app.route("/api/events", eventsRoutes); |
| ad6d4ad | 186 | |
| 45e31d0 | 187 | // API documentation |
| 188 | app.route("/", apiDocsRoutes); | |
| 79136bb | 189 | |
| 190 | // Auth routes (register, login, logout) | |
| 191 | app.route("/", authRoutes); | |
| 192 | ||
| 193 | // Settings routes (profile, SSH keys) | |
| 194 | app.route("/", settingsRoutes); | |
| 195 | ||
| 7298a17 | 196 | // 2FA / TOTP settings (Block B4) |
| 197 | app.route("/", settings2faRoutes); | |
| 198 | ||
| 2df1f8c | 199 | // WebAuthn / passkey routes (Block B5) |
| 200 | app.route("/", passkeyRoutes); | |
| 201 | ||
| 058d752 | 202 | // OAuth 2.0 provider (Block B6) |
| 203 | app.route("/", oauthRoutes); | |
| 204 | app.route("/", developerAppsRoutes); | |
| 205 | ||
| 6fc53bd | 206 | // Theme toggle (dark/light cookie) |
| 207 | app.route("/", themeRoutes); | |
| 208 | ||
| 209 | // Audit log UI | |
| 210 | app.route("/", auditRoutes); | |
| 211 | ||
| 212 | // Reactions API (issues, PRs, comments) | |
| 213 | app.route("/", reactionRoutes); | |
| 214 | ||
| 24cf2ca | 215 | // Saved replies (per-user canned comment templates) |
| 216 | app.route("/", savedReplyRoutes); | |
| 217 | ||
| 218 | // Environments + deployment history UI | |
| 219 | app.route("/", deploymentRoutes); | |
| 220 | ||
| 6563f0a | 221 | // Organizations + teams (Block B1) |
| 222 | app.route("/", orgRoutes); | |
| 223 | ||
| c81ab7a | 224 | // API tokens |
| 225 | app.route("/", tokenRoutes); | |
| 226 | ||
| 59b6fb2 | 227 | // Notifications |
| 3ef4c9d | 228 | app.route("/", notificationRoutes); |
| 229 | ||
| 79136bb | 230 | // Repo settings (description, visibility, delete) |
| 231 | app.route("/", repoSettings); | |
| 232 | ||
| 23d1a81 | 233 | // Repo collaborators (add/list/remove) |
| 234 | app.route("/", collaboratorRoutes); | |
| 235 | ||
| 04f6b7f | 236 | // Team-based repo collaborators (invite a whole team) |
| 237 | app.route("/", teamCollaboratorRoutes); | |
| 238 | ||
| 239 | // Collaborator invite accept flow (token-based) | |
| 240 | app.route("/", invitesRoutes); | |
| 241 | ||
| 242 | // Real-time SSE endpoint (topic-based live updates) | |
| 243 | app.route("/", liveEventsRoutes); | |
| 244 | ||
| c81ab7a | 245 | // Webhooks management |
| 246 | app.route("/", webhookRoutes); | |
| 247 | ||
| 79136bb | 248 | // Compare view (branch diffs) |
| 249 | app.route("/", compareRoutes); | |
| 250 | ||
| 251 | // Issue tracker | |
| 252 | app.route("/", issueRoutes); | |
| 253 | ||
| 0074234 | 254 | // Pull requests |
| 255 | app.route("/", pullRoutes); | |
| 256 | ||
| c81ab7a | 257 | // Fork |
| 258 | app.route("/", forkRoutes); | |
| 259 | ||
| 0074234 | 260 | // Web file editor |
| 261 | app.route("/", editorRoutes); | |
| 262 | ||
| 43de941 | 263 | // Contributors |
| 264 | app.route("/", contributorRoutes); | |
| 265 | ||
| 699e5c7 | 266 | // Health liveness + metrics endpoints |
| 2c34075 | 267 | app.route("/", healthRoutes); |
| 268 | ||
| f295f78 | 269 | // Cross-product platform status (public, CORS-open — see docs/PLATFORM_STATUS.md) |
| 270 | app.route("/api/platform-status", platformStatus); | |
| 271 | ||
| 52ad8b1 | 272 | // Block L4 — Public stats counters (powers landing-page social proof) |
| 273 | app.route("/", publicStatsRoutes); | |
| 274 | ||
| 275 | // Block L3 — Live /demo page + /api/v2/demo/* endpoints | |
| 276 | app.route("/", demoRoutes); | |
| 277 | ||
| 2316be6 | 278 | // Public /status — human-readable platform health page |
| 279 | app.route("/", statusRoutes); | |
| 280 | ||
| 80bed05 | 281 | // /help — quickstart + API cheatsheet |
| 282 | app.route("/", helpRoutes); | |
| 283 | ||
| 5f2e749 | 284 | // L8 — public /pricing page (free-tier polish). Mounted BEFORE marketing |
| 285 | // so the new editorial pricing layout wins the route; the legacy marketing | |
| 286 | // pricing remains as a safety net but is shadowed at the router. | |
| 287 | app.route("/", pricingRoutes); | |
| 288 | ||
| b0148e9 | 289 | // /pricing, /features, /about — marketing surface |
| 290 | app.route("/", marketingRoutes); | |
| 291 | ||
| 5618f9a | 292 | // SEO: robots.txt + sitemap.xml |
| 293 | app.route("/", seoRoutes); | |
| 294 | ||
| 05cdb85 | 295 | // /api/version — live build SHA + uptime; client poller uses this to |
| 296 | // surface 'New version available — reload' banners on deploy. | |
| 297 | app.route("/", versionRoutes); | |
| 298 | ||
| 699e5c7 | 299 | // Health dashboard (per-repo health page) |
| 300 | app.route("/", healthDashboardRoutes); | |
| 301 | ||
| 16b325c | 302 | // Insights (time-travel, dependencies, rollback) |
| 303 | app.route("/", insightRoutes); | |
| 304 | ||
| f1ab587 | 305 | // Command center dashboard |
| 306 | app.route("/", dashboardRoutes); | |
| 307 | ||
| 36b4cbd | 308 | // Legal pages (terms, privacy, AUP) |
| 309 | app.route("/", legalRoutes); | |
| 310 | ||
| bdbd0de | 311 | // GitHub import / migration |
| 312 | app.route("/", importRoutes); | |
| 14c3cc8 | 313 | app.route("/", importBulkRoutes); |
| 314 | app.route("/", migrationRoutes); | |
| 315 | ||
| 316 | // Spec-to-PR (experimental AI-generated draft PRs) | |
| 317 | app.route("/", specsRoutes); | |
| bdbd0de | 318 | |
| c81ab7a | 319 | // Explore page |
| 320 | app.route("/", exploreRoutes); | |
| 321 | ||
| 59b6fb2 | 322 | // Onboarding |
| 323 | app.route("/", onboardingRoutes); | |
| 324 | ||
| 0316dbb | 325 | // Admin + feature routes |
| 326 | app.route("/", adminRoutes); | |
| 327 | app.route("/", advisoriesRoutes); | |
| 328 | app.route("/", aiChangelogRoutes); | |
| 329 | app.route("/", aiExplainRoutes); | |
| 330 | app.route("/", aiTestsRoutes); | |
| 331 | app.route("/", askRoutes); | |
| 332 | app.route("/", billingRoutes); | |
| 6778ad2 | 333 | app.route("/", stripeWebhookRoutes); |
| 0316dbb | 334 | app.route("/", codeScanningRoutes); |
| 335 | app.route("/", commitStatusesRoutes); | |
| 336 | app.route("/", copilotRoutes); | |
| 337 | app.route("/", depUpdaterRoutes); | |
| 338 | app.route("/", depsRoutes); | |
| 339 | app.route("/", discussionsRoutes); | |
| 340 | app.route("/", environmentsRoutes); | |
| 341 | app.route("/", followsRoutes); | |
| 342 | app.route("/", gatesRoutes); | |
| 343 | app.route("/", gistsRoutes); | |
| 344 | app.route("/", graphqlRoutes); | |
| 2c2163e | 345 | app.route("/", mcpRoutes); |
| 0316dbb | 346 | app.route("/", marketplaceRoutes); |
| 347 | app.route("/", mergeQueueRoutes); | |
| 348 | app.route("/", mirrorsRoutes); | |
| 349 | app.route("/", orgInsightsRoutes); | |
| 350 | app.route("/", packagesRoutes); | |
| 351 | app.route("/", packagesApiRoutes); | |
| 352 | app.route("/", pagesRoutes); | |
| 353 | app.route("/", projectsRoutes); | |
| 354 | app.route("/", protectedTagsRoutes); | |
| 355 | app.route("/", pwaRoutes); | |
| 46d6165 | 356 | app.route("/", installRoutes); |
| 0316dbb | 357 | app.route("/", releasesRoutes); |
| 358 | app.route("/", requiredChecksRoutes); | |
| 359 | app.route("/", rulesetsRoutes); | |
| 360 | app.route("/", searchRoutes); | |
| 361 | app.route("/", semanticSearchRoutes); | |
| 362 | app.route("/", signingKeysRoutes); | |
| 363 | app.route("/", sponsorsRoutes); | |
| 364 | app.route("/", ssoRoutes); | |
| 46d6165 | 365 | app.route("/", githubOauthRoutes); |
| 0316dbb | 366 | app.route("/", symbolsRoutes); |
| 367 | app.route("/", templatesRoutes); | |
| 368 | app.route("/", trafficRoutes); | |
| 369 | app.route("/", wikisRoutes); | |
| 370 | app.route("/", workflowsRoutes); | |
| 5ff9cc2 | 371 | app.route("/", workflowArtifactsRoutes); |
| 372 | app.route("/", workflowSecretsRoutes); | |
| 46d6165 | 373 | app.route("/", sleepModeRoutes); |
| 52ad8b1 | 374 | app.route("/", vsGithubRoutes); |
| 0316dbb | 375 | |
| 79136bb | 376 | // Web UI (catch-all, must be last) |
| 377 | app.route("/", webRoutes); | |
| 378 | ||
| 379 | // Global 404 | |
| 380 | app.notFound((c) => { | |
| 36cc17a | 381 | const user = c.get("user") ?? null; |
| 79136bb | 382 | return c.html( |
| 36cc17a | 383 | <Layout title="Not Found" user={user}> |
| e1db10e | 384 | <div class="error-page"> |
| 385 | <div class="error-page-code">404</div> | |
| 386 | <div class="eyebrow">Not found</div> | |
| 387 | <h1 class="display error-page-title"> | |
| 388 | That page <span class="gradient-text">isn't here.</span> | |
| 389 | </h1> | |
| 390 | <p class="error-page-sub"> | |
| 391 | The URL might be wrong, the resource might have moved, or you | |
| 392 | might not have permission to see it. | |
| 393 | </p> | |
| 394 | <div class="error-page-actions"> | |
| 395 | <a href="/" class="btn btn-primary btn-lg">Go home</a> | |
| 396 | <a href="/explore" class="btn btn-ghost btn-lg">Explore repos</a> | |
| 397 | </div> | |
| 398 | <div class="error-page-meta"> | |
| 399 | <span class="meta-mono">{c.req.method} {c.req.path}</span> | |
| 400 | </div> | |
| 79136bb | 401 | </div> |
| 402 | </Layout>, | |
| 403 | 404 | |
| 404 | ); | |
| 405 | }); | |
| 406 | ||
| 407 | // Global error handler | |
| 408 | app.onError((err, c) => { | |
| 80bed05 | 409 | reportError(err, { |
| 410 | requestId: c.get("requestId"), | |
| 411 | path: c.req.path, | |
| 412 | method: c.req.method, | |
| 413 | }); | |
| e1db10e | 414 | const requestId = c.get("requestId" as never) as string | undefined; |
| 36cc17a | 415 | const user = c.get("user") ?? null; |
| 79136bb | 416 | return c.html( |
| 36cc17a | 417 | <Layout title="Error" user={user}> |
| e1db10e | 418 | <div class="error-page"> |
| 419 | <div class="error-page-code error-page-code-err">500</div> | |
| 420 | <div class="eyebrow" style="color:var(--red)">Server error</div> | |
| 421 | <h1 class="display error-page-title"> | |
| 422 | Something <span class="gradient-text">went wrong.</span> | |
| 423 | </h1> | |
| 424 | <p class="error-page-sub"> | |
| 425 | The error has been reported. Try again — if it persists, file | |
| 426 | an issue with the request ID below. | |
| 427 | </p> | |
| 428 | <div class="error-page-actions"> | |
| 429 | <a href={c.req.path} class="btn btn-primary btn-lg">Retry</a> | |
| 430 | <a href="/" class="btn btn-ghost btn-lg">Go home</a> | |
| 431 | </div> | |
| 432 | {requestId && ( | |
| 433 | <div class="error-page-meta"> | |
| 434 | <span class="meta-mono">request-id: {requestId}</span> | |
| 435 | </div> | |
| 436 | )} | |
| 79136bb | 437 | {process.env.NODE_ENV !== "production" && ( |
| e1db10e | 438 | <pre class="error-page-trace">{err.message}</pre> |
| 79136bb | 439 | )} |
| 440 | </div> | |
| 441 | </Layout>, | |
| 442 | 500 | |
| 443 | ); | |
| 444 | }); | |
| 445 | ||
| 446 | export default app; |