* Remove OData v2 show case: Genres TreeView * Refactored bookstore and fiori services: consolidate routing and remove deprecated files * Add Jest configuration file with silent mode enabled * Refactor test files: streamline imports and remove redundant code * Change price field type to Price for better clarity and precision * Example for separation of concerns: access-control.cds
Welcome to cap/samples
Find here a collection of samples for the SAP Cloud Application Programming Model organized in a simplistic monorepo setup.
See Overview of contained samples:
Preliminaries
Ensure you have the latest LTS version of Node.js, @sap/cds-dk installed globally, git and your IDE ready (see Initial Setup)
Download
If you've Git installed, clone this repo as shown below, otherwise download as ZIP file.
git clone https://github.com/sap-samples/cloud-cap-samples samples
cd samples
Setup
In the samples folder run:
npm ci
Run
With that you're ready to run the samples, for example:
cds watch bookshop
After that open this link in your browser: http://localhost:4004
When asked to log in, type alice as user and leave the password field blank, which is the default user.
Testing
Run the provided tests with jest or mocha, for example:
npx jest
While mocha is a bit smaller and faster, jest runs tests in parallel and isolation, which allows to run all tests.
Code Tours
Take one of the guided tours in VS Code through our CAP samples and learn which CAP features are showcased by the different parts of the repository. Just install the CodeTour extension for VS Code. We'll add more code tours in the future. Stay tuned!
Get Support
Check out the documentation at https://cap.cloud.sap.
In case you've a question, find a bug, or otherwise need support, use our community to get more visibility.
License
Copyright (c) 2022 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.