chore: wiring up the catalog 📕

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Johan Haals <johan.haals@gmail.com>
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2022-07-05 15:14:21 +02:00
committed by Patrik Oldsberg
parent 118ce976f1
commit 7e48611ba6
7 changed files with 90 additions and 9 deletions
@@ -15,11 +15,30 @@
*/
import { createServiceRef } from '../system/types';
import { Handler } from 'express';
export interface HttpRouterApi {
get(path: string): void;
// const apiRouter = Router();
// apiRouter.use('/catalog', await catalog(catalogEnv));
// const service = createServiceBuilder(module)
// .loadConfig(config)
// .addRouter('', await healthcheck(healthcheckEnv))
// .addRouter('', metricsHandler())
// .addRouter('/api', apiRouter)
// .addRouter('', await app(appEnv));
// interface BackstageRequest extends Request {
// identity?: BackstageIdentity;
// context?: Context;
// }
// interface RequestIdentityService {
// getRequestIdentity(req: Request): BackstageIdentity | undefined;
// }
export interface HttpRouterService {
use(handler: Handler): void;
}
export const httpRouterServiceRef = createServiceRef<HttpRouterApi>({
export const httpRouterServiceRef = createServiceRef<HttpRouterService>({
id: 'core.httpRouter',
});
@@ -28,7 +28,7 @@
export { configServiceRef } from './configServiceRef';
export { httpRouterServiceRef } from './httpRouterServiceRef';
export type { HttpRouterApi } from './httpRouterServiceRef';
export type { HttpRouterService } from './httpRouterServiceRef';
export { loggerServiceRef } from './loggerServiceRef';
export type { Logger } from './loggerServiceRef';
export { urlReaderServiceRef } from './urlReaderServiceRef';