Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Feb 14, 2024
1 parent 2db0176 commit 04a4eb6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions routes/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ route.get('/api/welcome/', () => 'hello world 4') // stacksjs.org/api/welcome/

route.health() // /api/health
// route.action('BuddyAction') // /api/buddy
route.get('/api/buddy/commands', 'Buddy/CommandsAction') // /api/buddy
route.get('/api/buddy/versions', 'Buddy/VersionsAction') // /api/buddy
route.get('/api/buddy/commands', 'Buddy/CommandsAction')
route.get('/api/buddy/versions', 'Buddy/VersionsAction')
// route.job('/api/example') // the equivalent of route.get('/api/example', 'ExampleJob')
// route.get('/api/buddy-2', '../app/Actions/BuddyAction') // todo: support this
// route.get('/api/buddy-3', import('../app/Actions/BuddyAction')) // todo: support this
Expand Down
4 changes: 2 additions & 2 deletions storage/framework/core/cloud/src/cloud/compute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class ComputeStack {
}),
}),
healthCheck: {
command: ['CMD-SHELL', 'curl -f http://localhost:3000/api/healthy || exit 1'], // requires curl inside the container which isn't available in the base image. I wonder if there is a better way
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
interval: Duration.seconds(10),
timeout: Duration.seconds(5),
retries: 3,
Expand Down Expand Up @@ -114,7 +114,7 @@ export class ComputeStack {
port: 3000,
healthCheck: {
interval: Duration.seconds(6),
path: '/api/healthy',
path: '/api/health',
protocol: elbv2.Protocol.HTTP,
timeout: Duration.seconds(5),
healthyThresholdCount: 2,
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/router/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class Router implements RouterInterface {
const healthModule = await import(p.userActionsPath('HealthAction.ts'))
const callback = healthModule.default.handle

this.addRoute('GET', '/api/healthy', callback, 200)
this.addRoute('GET', '/api/health', callback, 200)
return this
}

Expand Down

0 comments on commit 04a4eb6

Please sign in to comment.