UNPKG

patternplate-server

Version:

Programmatically serve atomic patterns via a REST API

18 lines (16 loc) 426 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = healthRouteFactory; function healthRouteFactory(application, configuration) { return function* healthRoute() { let health = application.cache ? application.cache.ready : true; this.status = health ? 200 : 503; this.body = { 'name': application.name, 'healthy': health }; }; } module.exports = exports['default'];