Skip to content

Commit

Permalink
Add health and assign correct port to blog
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejearley committed Oct 24, 2023
1 parent ca96cae commit e4d0884
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion infrastructure/cdk/src/providers/blog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class BlogStack extends cdk.Stack {
domainName: `${subdomains.blog}.${rootDomain}`, // e.g. blog.casimir.co or blog.dev.casimir.co
domainZone: hostedZone,
taskImageOptions: {
containerPort: 4000,
containerPort: 4001,
image: ecs.ContainerImage.fromDockerImageAsset(imageAsset),
environment: {
PROJECT: project,
Expand Down
4 changes: 4 additions & 0 deletions services/blog/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ app.get('/articles/:id', async (req, res) => {
}
})

app.get('/health', (_req, res) => {
res.status(200).send('OK')
})

app.listen(4001, () => {
console.log('Blog server listening on port 4001')
})

0 comments on commit e4d0884

Please sign in to comment.