Coder Social home page Coder Social logo

sap-samples / cloud-sdk-js Goto Github PK

View Code? Open in Web Editor NEW
30.0 12.0 12.0 28.1 MB

This repository provides code samples and examples how to use the SAP Cloud SDK for JavaScript/TypeScript. The SAP Cloud SDK makes developing applications on the SAP Business Technology Platform easy.

Home Page: https://sap.github.io/cloud-sdk/docs/js/getting-started

License: Apache License 2.0

TypeScript 100.00%
sap-btp javascript typescript sample-code cloud sample

cloud-sdk-js's Introduction

REUSE status

SAP Cloud SDK Samples

Description

This repository contains code samples showcasing the SAP Cloud SDK for JavaScript / TypeScript. We plan to increase the number of samples over time. The samples will serve different purposes:

  • There will be simple "Hello World" applications. They will contain a complete project with all configurations needed to execute it.
  • There will be code samples to be used in an existing project. These samples do not work on their own but illustrate how to use the SAP Cloud SDK.
  • There will be solutions to tutorials or training courses. These applications have larger scopes and showcase the business value you can create using the SAP Cloud SDK.

Requirements

The minimal requirements are:

  • A terminal to execute commands
  • A recent version of node and npm installed e.g. node 14 and npm 6
  • An IDE or a text editor of your choice

If you want to explore the possibilities beyond local tests you need:

  • Access to a SAP Business Technology Platform account
  • Entitlement to use resources like service instance creation and application processing units
  • Permission to deploy applications and create service instances

Support

If you find a bug or have questions about the concrete content of this repository create an issue here. If you have a general question about a feature of the SAP Cloud SDK create an issue in the SAP Cloud SDK repository

Contributing

If you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses the standard DCO text of the Linux Foundation.

Code of Conduct

For this repository the code of conduct of the SDK applies.

License

Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.

cloud-sdk-js's People

Contributors

artemkovalyov avatar bot-sdk-js avatar deekshas8 avatar dependabot[bot] avatar frankessenberger avatar fwilhe avatar jjtang1985 avatar marikaner avatar tomfrenken avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloud-sdk-js's Issues

Multi-Tenant Tutorial: add redirect-uris in xs-security.json to fix 'Call the Service via Approuter'

Describe the bug
login callback uri wasn't built correctly.

To Reproduce
Follow the tutorial up to step 'Call the Service via Approuter'. The call will fail and you'll find the misconfigured callback url in the browser's dev tool console.

Expected behavior
No authentication/authorization issues.

Used Versions:

  • node version via node -v: v18.15.0
  • npm version via npm -v: 9.5.0
  • SAP Cloud SDK version you used as dependency: does not apply, because the issue was with @sap/approuter and XSUAA
  • @sap/approuter": "14.3.0"

Code Examples
Updating XSUAA xs-security.json with redirect-uri property fixed the issue.

Additional context
Following the contributing guidelines, I'd rather discuss the change before submitting a PR. It was an educated guess based on previous experience with XSUAA's xs-security.json. I don't know why we needed that property to get it working and whether it can be safely added for everyone.

JavaScript example fails: error TS2694: Namespace 'React' has no exported member 'SFC'.

Describe the bug

git clone \
  --depth 1  \
  --filter=blob:none  \
  --sparse \
  https://github.com/SAP-samples/cloud-sdk-js.git \
;
cd cloud-sdk-js
git sparse-checkout set samples/cf-sample-application

cd cloud-sdk-js/samples/cf-sample-application
npm install
npm run start:dev

../node_modules/@types/markdown-to-jsx/index.d.ts:21:13 - error TS2694: Namespace 'React' has no exported member 'SFC'.

[11:29:55] Starting compilation in watch mode...

../../../node_modules/@types/markdown-to-jsx/index.d.ts:21:13 - error TS2694: Namespace 'React' has no exported member 'SFC'.

21     | React.SFC<P>
               ~~~

../../../node_modules/@types/markdown-to-jsx/index.d.ts:23:66 - error TS2694: Namespace 'React' has no exported member 'SFC'.

23           component: string | React.ComponentClass<P, S> | React.SFC<P>;
                                                                    ~~~

../../../node_modules/@types/markdown-to-jsx/index.d.ts:74:21 - error TS2694: Namespace 'React' has no exported member 'SFC'.

74         type: React.SFC<P> | React.ComponentClass<P> | string,
                       ~~~

[11:30:00] Found 3 errors. Watching for file changes.

Used Versions:

  • node version via node -v v16.16.0
  • npm version via npm -v 8.18.0
  • SAP Cloud SDK version you used as dependency

Multi-Target Application

Useful repo for multi-tenant app.
SAP recommends using MTA. So I would suggest these samples also use mta approach so that they are more useful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.