also looking at this
Adopt the hq-apps app conventions
#76
31 files
+1656
-395
| @@ -1,4 +1,5 @@ | ||
| 1 | 1 | import { response, route } from '@stacksjs/router' |
| 2 | import { healthResponse } from '../app/Support/health' | |
| 2 | 3 | |
| 3 | 4 | /** |
| 4 | 5 | * This file is the entry point for your application's API routes. |
| @@ -17,6 +18,14 @@ import { response, route } from '@stacksjs/router' | ||
| 17 | 18 | * @see https://docs.stacksjs.com/routing |
| 18 | 19 | */ |
| 19 | 20 | |
| 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(). | |
| 27 | route.get('/health', () => healthResponse()) | |
| 28 | ||
| 20 | 29 | // Your custom routes go here: |
| 21 | 30 | route.get('/', () => response.text('hello')) |
| 22 | 31 | route.get('/coming-soon', 'Controllers/ComingSoonController@index') |