Skip to content

Commit b29ba38

Browse files
committed
chore: wip
1 parent da9b36d commit b29ba38

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

app/Actions/HealthAction.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import { Action } from '@stacksjs/actions'
66
*
77
* Please be aware, this action is used as a container health check. While you are encouraged
88
* to extend this health check as you see fit, the framework requires the `status`
9-
* property to be present in the response of the `/api/health` endpoint.
9+
* property to be present in the response of the `/health` endpoint.
1010
*/
1111

1212
export default new Action({
1313
name: 'Health',
1414
description: 'A health check for your application.',
15-
path: '/api/health',
15+
path: '/health',
1616

1717
handle() {
1818
return {

app/Actions/SetupAction.ts renamed to app/Actions/InstallAction.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,13 @@ import process from 'node:process'
22
import { Action } from '@stacksjs/actions'
33

44
/**
5-
* A health check for your application.
6-
*
7-
* Please be aware, this action is used as a container health check. While you are encouraged
8-
* to extend this health check as you see fit, the framework requires the `status`
9-
* property to be present in the response of the `/api/health` endpoint.
5+
* CLI Setup
106
*/
117

128
export default new Action({
139
name: 'CLI Setup',
1410
description: 'This action is used to setup the CLI.',
15-
path: '/api/cli-setup',
11+
path: '/install',
1612

1713
handle() {
1814
const setupScriptContents = `if [ -n "$1" ]; then

routes/api.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ route.get('/hello/world', () => 'hello world, buddy') // $APP_URL/api/hello/worl
1414

1515
route.post('/email/subscribe', 'Actions/SubscriberEmailAction')
1616
route.post('/login', 'Actions/LoginAction')
17-
route.post('/ai/ask', 'Actions/AI/AskAction')
18-
route.post('/ai/summary', 'Actions/AI/SummaryAction')
17+
1918
// route.email('/welcome')
2019
route.health() // adds a GET `/api/health` route
20+
route.get('/install', 'Actions/InstallAction')
21+
route.post('/ai/ask', 'Actions/AI/AskAction')
22+
route.post('/ai/summary', 'Actions/AI/SummaryAction')
2123

2224
// route.group('/some-path', async () => {...})
2325
// route.action('/example') // equivalent to `route.get('/example', 'ExampleAction')`

storage/framework/core/cloud/src/cloud/compute.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export class ComputeStack {
6565
}),
6666
}),
6767
healthCheck: {
68-
command: ['CMD-SHELL', 'curl -f http://localhost:3000/api/health || exit 1'], // requires curl inside the container which isn't available in the base image. I wonder if there is a better way
68+
command: ['CMD-SHELL', 'curl -f http://localhost:3000/health || exit 1'], // requires curl inside the container which isn't available in the base image. I wonder if there is a better way
6969
interval: Duration.seconds(10),
7070
timeout: Duration.seconds(5),
7171
retries: 3,
@@ -122,7 +122,7 @@ export class ComputeStack {
122122
port: 3000,
123123
healthCheck: {
124124
interval: Duration.seconds(6),
125-
path: '/api/health',
125+
path: '/health',
126126
protocol: elbv2.Protocol.HTTP,
127127
timeout: Duration.seconds(5),
128128
healthyThresholdCount: 2,

0 commit comments

Comments
 (0)