Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/sample app readme update #125

Merged
merged 3 commits into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions sample-code/spring-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,25 @@
Sample code to demonstrate the usage of the SAP AI SDK.
Also used as basis for running E2E tests.

## Build, Run, Deploy Locally
## Build and Run the Sample App

Build the project with:
Before you can run the sample app, you need to install the AI SDK into your local Maven repository:

1. `mvn compile`
2. [Download a service key for your AI Core service instance](../../README.md#set-credentials-as-dedicated-environment-variable)
3. Create the environment variable `AICORE_SERVICE_KEY`
4. Run the application with `mvn spring-boot:run`
5. [See all available endpoints](localhost:8080)
* Run `mvn install -DskipTests` from the root directory of the repository.

> [!NOTE]
> The sample app uses the latest state of the SDK, so make sure to install the SDK after pulling a new version via Git.
> Alternatively, you check out one of the release tags of the repository, e.g. `git fetch --all --tags && git checkout rel/0.1.0`.
Comment on lines +14 to +16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Minor)

Not a fan of this/a note. Semantically it's correct, but visually it will be most prominent, highlighted paragraph of the document.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but I feel that visually it's not as prominent as the notes on Docusaurus, because it doesn't have a different background, it's "just" a blue bar at the right. So maybe still acceptable..


Next, you'll need to set up credentials for the AI Core service:

* Follow [these instructions](../../README.md#option-1-set-credentials-as-environment-variable) to configure the credentials via environment variables.

Finally, you can start the sample app:

* Run `mvn spring-boot:run` from the sample app directory.

Head to http://localhost:8080 in your browser to see all available endpoints.

## Run the E2E Test

Expand Down