@@ -50,7 +50,6 @@ Open `packages/app/src/App.tsx` and below the last `import` line, add:
|
||||
|
||||
```typescript title="packages/app/src/App.tsx"
|
||||
import { githubAuthApiRef } from '@backstage/core-plugin-api';
|
||||
import { SignInPage } from '@backstage/core-components';
|
||||
```
|
||||
|
||||
Search for `const app = createApp({` in this file, and below `apis,` add:
|
||||
|
||||
@@ -73,8 +73,7 @@ to install and configure the client.
|
||||
Go to the root directory of your freshly installed Backstage
|
||||
App. Run the following to install the PostgreSQL client into your backend:
|
||||
|
||||
```bash
|
||||
# From your Backstage root directory
|
||||
```bash title="From your Backstage root directory"
|
||||
yarn --cwd packages/backend add pg
|
||||
```
|
||||
|
||||
|
||||
@@ -21,8 +21,7 @@ to an entity in the software catalog.
|
||||
|
||||
1. Add the plugin's npm package to the repo:
|
||||
|
||||
```bash
|
||||
# From your Backstage root directory
|
||||
```bash title="From your Backstage root directory"
|
||||
yarn --cwd packages/app add @circleci/backstage-plugin
|
||||
```
|
||||
|
||||
|
||||
@@ -28,8 +28,7 @@ Now, let's get started by installing the home plugin and creating a simple homep
|
||||
|
||||
#### 1. Install the plugin
|
||||
|
||||
```bash
|
||||
# From your Backstage root directory
|
||||
```bash title="From your Backstage root directory"
|
||||
yarn --cwd packages/app add @backstage/plugin-home
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: index
|
||||
title: Installing a standalone server
|
||||
title: Creating your Backstage App
|
||||
sidebar_label: Introduction
|
||||
description: How to install Backstage for your own use.
|
||||
---
|
||||
|
||||
@@ -63,21 +63,19 @@ When a given dependency version is the _same_ between different packages, the
|
||||
dependency is hoisted to the main `node_modules` folder in the monorepo root to
|
||||
be shared between packages. When _different_ versions of the same dependency are
|
||||
encountered, Yarn creates a `node_modules` folder within a particular package.
|
||||
This can lead to multiple versions of the same package being installed and used
|
||||
in the same app.
|
||||
|
||||
This can lead to confusing situations with type definitions, or anything with
|
||||
global state. React [Context](https://reactjs.org/docs/context.html), for
|
||||
example, depends on global referential equality. This can cause problems in
|
||||
Backstage with API lookup, or config loading.
|
||||
All Backstage core packages are implemented in such as way that package
|
||||
duplication is **not** a problem. For example, duplicate installations of
|
||||
packages like `@backstage/core-plugin-api`, `@backstage/core-components`,
|
||||
`@backstage/plugin-catalog-react`, and `@backstage/backend-plugin-api` are all
|
||||
acceptable.
|
||||
|
||||
To help resolve these situations, the Backstage CLI has
|
||||
[versions:check](https://backstage.io/docs/tooling/cli/03-commands#versionscheck). This
|
||||
will validate versions of `@backstage` packages in your app to check for
|
||||
duplicate definitions:
|
||||
|
||||
```bash
|
||||
# Add --fix to attempt automatic resolution in yarn.lock
|
||||
yarn backstage-cli versions:check
|
||||
```
|
||||
While package duplication might be acceptable in many cases, you might want to
|
||||
deduplicate packages for the purpose of optimizing bundle size and installation
|
||||
speed. We recommend using deduplication utilities such as `yarn dedupe` to trim
|
||||
down the number of duplicate packages.
|
||||
|
||||
## Proxy
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ Run your Backstage app with `yarn dev`. Navigate to `http://localhost:3000`.
|
||||
|
||||
If you're not already logged in, you should see a login screen like this,
|
||||
|
||||

|
||||
|
||||
To login, you should choose the "Github" provider and click the "Sign in" button. This will redirect you to a Github OAuth page. Verify that the scopes mentioned on that page match the setup you did in [the authentication tutorial](./config/authentication.md). Once you click "Confirm", you will be brought back to the Backstage interface and signed in!
|
||||
|
||||
If you are already logged in, you will be automatically brought to your Backstage instance.
|
||||
|
||||
Reference in New Issue
Block a user