UNPKG

@thisisagile/easy-service

Version:

Straightforward library for building domain-driven microservice architectures

12 lines (10 loc) 380 B
import { resolve, Json } from '@thisisagile/easy'; import { HealthUri } from './HealthUri'; import { Resource } from '../resources/Resource'; import { route } from '../resources/Route'; import { get } from '../http/Verb'; @route(HealthUri.Health) export class HealthResource implements Resource { @get() ok = (): Promise<Json> => resolve({ state: 'Service is healthy.' }); }