This project is developed for the purpose of an organised partner bootcamp. Participants may clone the repository, install/build & run on your local environment or (recommended
) SAP Business Application Studio.
It is for an extended use case based on the topic of Digital Experience - SAP Launchpad Service; to illustrate a simple bookshop management solution with Notifications API Domain services.
To deploy this successful, please make sure you've completed the pre-requisite section.
- Deployed the Bookshop solution that is based on SAP Cloud Application Programming model, in your SAP Business Technology Platform trial account.
- Enable notification for custom applications on SAP BTP To enable custom apps to publish notifications, they need to send data to the service via a destination.
Follow this guide to generate the notification service’s credentials and create a destination based on these credentials.
Launchpad site settings in the admin UI.
Don’t forget to enable the “Show Notifications” settings of the Launchpad site that you want to use.
Step 1: Clone this Git Repo into a bookshop-lp
project folder.
git clone https://github.com/jacobahtan/bootcamp-lp-bookshop-notifications.git bookshop-lp
Step 2: Create the required Service Keys for Local Runtime in SAP BAS. We will be utilising the existing SAP BTP services we've created for the bookshop solution to create additional service keys for the run time operation.
(Note: below will only work if you've followed strictly to deploy the bookshop solution as part of the pre-requisite, where 2 BTP services would have been created automatically for you - bookshop-xsuaa-service & bookshop-destination-service)
cf create-service-key bookshop-xsuaa-service uaa-key
cf create-service-key bookshop-destination-service destination-key
cf service-key bookshop-xsuaa-service uaa-key
cf service-key bookshop-destination-service destination-key
Replace each respective service key into the respective section of the default-env.json file.
Step 3: Install required dependencies and run it locally.
Navigate into your bookshop-lp folder, and then run the following commands.
cd bookshop-lp
npm install
npm start
Congratulations! You have just triggered your first notification from a custom-built app successfully.
Alternatively to running the application locally, you can also execute an HTTP client script that does the same for you.
If you are faced with any problem in regards to the example application or the description, feel free to create an issue.
This repository project took reference from this blog post, so do give it a good read for more explanation & breakdown.
Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under SAP Sample Code License Agreement, except as noted otherwise in the LICENSE file.