import { ContentType , Get , HttpError , JsonController } from 'routing-controllers' ; import * as fs from 'fs' ; @ JsonController ( '/about' ) export class AboutController { api apiName apiGroup apiSuccess apiSuccessExample apiError @ Get ( '/dependencies' ) @ ContentType ( 'application/json' ) async getDependencies ( ) { try { return await fs . readFileSync ( 'nlf-licenses.json' ) ; } catch ( err ) { throw new HttpError ( 500 , 'Licensefile not found' ) ; } } }