Added support for new backend system
Signed-off-by: Josh Uvi <joshuauvbiekpahor@gmail.com>
This commit is contained in:
@@ -67,6 +67,29 @@ diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts
|
||||
apiRouter.use(notFoundHandler());
|
||||
```
|
||||
|
||||
## New Backend System
|
||||
|
||||
The code coverage backend plugin has support for the [new backend system](https://backstage.io/docs/backend-system/), here's how you can set that up:
|
||||
|
||||
In your `packages/backend/src/index.ts` make the following changes:
|
||||
|
||||
```diff
|
||||
import { createBackend } from '@backstage/backend-defaults';
|
||||
+ import { codeCoveragePlugin } from '@backstage/plugin-code-coverage-backend';
|
||||
const backend = createBackend();
|
||||
// ... other feature additions
|
||||
+ backend.add(codeCoveragePlugin());
|
||||
backend.start();
|
||||
```
|
||||
|
||||
Alternatively, you can actually remove the import line above, and do this instead.
|
||||
|
||||
```diff
|
||||
backend.add(explorePlugin());
|
||||
+ backend.add(import('@backstage/plugin-explore-backend'));
|
||||
|
||||
```
|
||||
|
||||
## Configuring your entity
|
||||
|
||||
In order to use this plugin, you must set the `backstage.io/code-coverage` annotation.
|
||||
|
||||
Reference in New Issue
Block a user