committed by
Johan Haals
parent
37a218dc79
commit
559a0de98c
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
CatalogBuilder,
|
||||
createRouter,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
import { CatalogBuilder } from '@backstage/plugin-catalog-backend';
|
||||
import { Router } from 'express';
|
||||
import { PluginEnvironment } from '../types';
|
||||
|
||||
@@ -9,22 +6,7 @@ export default async function createPlugin(
|
||||
env: PluginEnvironment,
|
||||
): Promise<Router> {
|
||||
const builder = await CatalogBuilder.create(env);
|
||||
const {
|
||||
entitiesCatalog,
|
||||
locationsCatalog,
|
||||
locationService,
|
||||
processingEngine,
|
||||
locationAnalyzer,
|
||||
} = await builder.build();
|
||||
|
||||
const { processingEngine, router } = await builder.build();
|
||||
await processingEngine.start();
|
||||
|
||||
return await createRouter({
|
||||
entitiesCatalog,
|
||||
locationsCatalog,
|
||||
locationService,
|
||||
locationAnalyzer,
|
||||
logger: env.logger,
|
||||
config: env.config,
|
||||
});
|
||||
return router;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user