Skip to content

Commit

Permalink
fix: health check (#610)
Browse files Browse the repository at this point in the history
  • Loading branch information
danadajian authored Jan 23, 2025
1 parent e868f7d commit 3c67569
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion app/frontend/cypress/e2e/home-page.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
describe('Homepage', () => {
it('should visit the home page', () => {
cy.visit('/');
cy.findByText(/Welcome to Comparadise/);
cy.findByText(/Welcome to Comparadise/).should('be.visible');
});

it('should return 200 response for health check', () => {
cy.request('/health').should(response => {
expect(response.status).to.eq(200);
});
});
});
3 changes: 2 additions & 1 deletion app/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import index from './public/index.html';

const server = serve({
static: {
'/': index
'/': index,
'/health': new Response('healthy', { status: 200 })
},
port: process.env.PORT ?? 8080,
async fetch(request, response) {
Expand Down

0 comments on commit 3c67569

Please sign in to comment.