diff --git a/.changeset/yellow-rice-appear.md b/.changeset/yellow-rice-appear.md new file mode 100644 index 0000000000..209b379bb6 --- /dev/null +++ b/.changeset/yellow-rice-appear.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-lighthouse': patch +--- + +Change setup wording of intro card to latest diff --git a/plugins/lighthouse/src/components/Intro/index.tsx b/plugins/lighthouse/src/components/Intro/index.tsx index b140141c9f..8e8f9ac88f 100644 --- a/plugins/lighthouse/src/components/Intro/index.tsx +++ b/plugins/lighthouse/src/components/Intro/index.tsx @@ -41,31 +41,37 @@ To get started, you will need a running instance of [lighthouse-audit-service](h _It's likely you will need to enable CORS when running lighthouse-audit-service. Initialize the app with the environment variable \`LAS_CORS\` set to \`true\`._ -When you have an instance running that Backstage can hook into, make sure to export the plugin in -your app's [\`plugins.ts\`](https://github.com/backstage/backstage/blob/master/packages/app/src/plugins.ts) -to enable the plugin: +When you have an instance running that Backstage can hook into, first install the plugin into your app: + +\`\`\`sh +$ yarn add @backstage/plugin-lighthouse +\`\`\` + +Then make sure to export the plugin in your app's [\`plugins.ts\`](https://github.com/backstage/backstage/blob/master/packages/app/src/plugins.ts) to enable the plugin: \`\`\`js export { plugin as LighthousePlugin } from '@backstage/plugin-lighthouse'; \`\`\` -Then, you need to use the \`lighthouseApiRef\` exported from the plugin to initialize the Rest API in -your [\`apis.ts\`](https://github.com/backstage/backstage/blob/master/packages/app/src/apis.ts). +Modify your app routes in \`App.tsx\` to include the Router component exported from the plugin, for example: \`\`\`js -import { ApiHolder, ApiRegistry } from '@backstage/core'; -import { - lighthouseApiRef, - LighthouseRestApi, -} from '@backstage/plugin-lighthouse'; +// At the top imports +import { Router as LighthouseRouter } from '@backstage/plugin-lighthouse'; -const builder = ApiRegistry.builder(); +// Inside App component + + // ... + } /> + // ... +; +\`\`\` -export const lighthouseApi = - new LighthouseRestApi(/* your service url here! */); -builder.add(lighthouseApiRef, lighthouseApi); +Then configure the \`lighthouse-audit-service\` URL in your [\`app-config.yaml\`](https://github.com/backstage/backstage/blob/master/app-config.yaml). -export default builder.build() as ApiHolder; +\`\`\`yaml +lighthouse: + baseUrl: http://your-service-url \`\`\` `;