File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 1+ import { Injectable } from '@decorators/di' ;
2+ import { Controller , Get , Response } from '@decorators/express' ;
3+ import * as Express from 'express' ;
4+
5+ @Controller ( '/healthz' )
6+ @Injectable ( )
7+ export class HealthController {
8+ @Get ( '/' )
9+ public getHealth ( @Response ( ) res : Express . Response ) {
10+ return res . status ( 200 ) . send ( 'OK' ) ;
11+ }
12+
13+ @Get ( '/jpp' )
14+ public getJpp ( @Response ( ) res : Express . Response ) {
15+ return res . status ( 200 ) . sendFile ( 'umvoltoja.mp3' , { root : `${ __dirname } /../../public` } ) ;
16+ }
17+ }
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import { WebhookController } from './controllers/webhook';
3535import { NotificationController } from './controllers/notifications' ;
3636import { Email } from './external/Email' ;
3737import { ReportsController } from './controllers/reports' ;
38+ import { HealthController } from './controllers/healthz' ;
3839
3940// ENV
4041import { config } from 'dotenv-cra' ;
@@ -112,7 +113,8 @@ export const main = async () => {
112113 NotificationController ,
113114 ProducersController ,
114115 WebhookController ,
115- ReportsController
116+ ReportsController ,
117+ HealthController
116118 ] ) ;
117119
118120 app . use ( '/' , ( _req , res ) => {
You can’t perform that action at this time.
0 commit comments