Skip to content

Commit

Permalink
docs(js): fix predictions setup example (#8153)
Browse files Browse the repository at this point in the history
* fix predictions front end configuration example

* update pkg installation
  • Loading branch information
jjarvisp authored Dec 9, 2024
1 parent 0dfff00 commit df591e1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,21 +145,21 @@ backend.addOutput({
To install the Amplify library to use predictions features, run the following commands in your project's root folder:

```bash title="Terminal" showLineNumbers={false}
npm add aws-amplify
npm add aws-amplify @aws-amplify/predictions
```

## Configure the frontend

Import and load the configuration file in your app. It is recommended you add the Amplify configuration step to your app's root entry point. For example `main.ts` in React and Angular.

```ts title="src/main.ts"
import { Predictions } from "aws-amplify/predictions";
import { Amplify } from "aws-amplify";
import outputs from "./amplify_outputs.json";

Amplify.configure(outputs);

Amplify.configure({
...Amplify.getConfig(),
Predictions: config.custom.Predictions,
Predictions: outputs.custom.Predictions,
});
```

0 comments on commit df591e1

Please sign in to comment.