@sourceloop/ctrl-plane-orchestrator-service
Version:
ARC SaaS Orchestrator service.
23 lines (20 loc) • 559 B
text/typescript
import {inject} from '@loopback/core';
import {Request, RestBindings, get} from '@loopback/rest';
/**
* A simple controller to bounce back http requests
*/
export class PingController {
constructor(
(RestBindings.Http.REQUEST) private readonly req: Request,
) {}
('/ping')
ping(): object {
// Reply with a greeting, the current time, the url, and request headers
return {
greeting: 'Hello from Orchestrator Service.',
date: new Date(),
url: this.req.url,
headers: {...this.req.headers},
};
}
}