ReviewOS

also looking at this

stacks/bench-review

Adopt the hq-apps app conventions

#76
Merged glennmichael123 wants to merge chore/hq-apps-conventions into main
31 files +1656 -395
routes/api.tsmodified+9-0
Changes to routes/api.ts
@@ -1,4 +1,5 @@
11import { response, route } from '@stacksjs/router'
2import { healthResponse } from '../app/Support/health'
23
34/**
45 * This file is the entry point for your application's API routes.
@@ -17,6 +18,14 @@ import { response, route } from '@stacksjs/router'
1718 * @see https://docs.stacksjs.com/routing
1819 */
1920
21// Health — the endpoint uptime monitoring points at. Declared bare (`/health`)
22// because this file auto-prefixes with `/api`, so it serves at `/api/health`.
23// Unauthenticated and deliberately uncached; answers 503 when the database or
24// cache probe fails, so a plain HTTP check gets the right answer without
25// parsing the body. See app/Support/health.ts for why it isn't the framework's
26// route.health().
27route.get('/health', () => healthResponse())
28
2029// Your custom routes go here:
2130route.get('/', () => response.text('hello'))
2231route.get('/coming-soon', 'Controllers/ComingSoonController@index')