import { Router , Request , Response } from 'express' ; import { getAll } from '../services/account.service' ; import { join } from 'path' ; const router = Router ( ) ; router . get ( '/' , async ( req , res ) => { try { const indexFile = join ( __dirname , '../../../../frontend/dist/index.html' ) ; console . log ( indexFile ) ; res . sendFile ( indexFile ) ; } catch ( ex ) { console . log ( ex ) ; res . status ( 500 ) . send ( ex ) ; } } ) ; router . get ( '/healthcheck' , async ( req , res ) => { try { res . send ( 'SUCCESS' ) ; } catch ( ex ) { console . log ( ex ) ; res . status ( 500 ) . send ( ex ) ; } } ) ; export const DefaultCtrl = router ;