Find here a collection of samples for the SAP Cloud Application Programming Model organized in a simplistic monorepo setup. → See Overview of contained samples
- Install @sap/cds-dk globally as documented in capire
npm i -g @sap/cds-dk
- Optional: Use Visual Studio Code
Clone this repo as shown below, if you have git installed, otherwise download as zip file.
git clone https://github.com/sap-samples/cloud-cap-samples samples
cd samples
In the samples folder run:
npm install
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
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.
We've simple npm registry mock included which allows you to do an npm install @capire/<package>
anywhere locally. Use it as follows:
- Start the @capire registry:
npm run registry
While running this will have
@capire:registry=http://localhost:4444
set with npmrc.
- Install one of the @capire packages wherever you like, e.g.:
npm add @capire/common @capire/bookshop
Check out the documentation at https://cap.cloud.sap.
In case you have a question, find a bug, or otherwise need support, please use our community.
Copyright (c) 2020 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.