import { mapValues } from 'lodash' ; import { getLogger } from 'log4js' ; import { JsonController , Get } from 'routing-controllers' ; import { Service } from 'typedi' ; import { Poker } from '../../util' ; const logger = getLogger ( 'home' ) ; @ Service ( ) @ JsonController ( ) export class HomeController { @ Get ( ) index ( ) { logger . info ( 'hello world' ) ; return 'hello world' ; } @ Get ( '/room-health' ) roomHealth ( ) { return mapValues ( Poker . runningPokers , p => p . room ) ; } }