All Projects → SAP-archive → cloud-function-nodejs-samples

SAP-archive / cloud-function-nodejs-samples

Licence: other
SAP Cloud Platform Functions samples written in Node.JS

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to cloud-function-nodejs-samples

hcp-portal-service-samples
Code samples of site and page templates, applications, widgets, shell plugins and more, intended to be used as references for development of custom content for SAP HANA Cloud Platform portal service sites.
Stars: ✭ 29 (+107.14%)
Mutual labels:  sample, sample-code, sap-cloud-platform
cloud-cap-risk-management
The SAP Risk Management example applications show how to deploy a CAP (SAP Cloud Application Programming model) application to Cloud Foundry and Kyma.
Stars: ✭ 36 (+157.14%)
Mutual labels:  sample, sample-code, sap-cloud-platform
smb-summit-hackathon
Build Blocks for the SAP SMB Summit Hackathons.
Stars: ✭ 23 (+64.29%)
Mutual labels:  sample, sample-code, sap-cloud-platform
cloud-bulletinboard-ads
This is the bulletinboard-ads sample application code used in the openSAP course: Cloud-Native Development with SAP Business Technology Platform (formerly SAP Cloud Platform).
Stars: ✭ 75 (+435.71%)
Mutual labels:  sample, sample-code, sap-cloud-platform
cloud-platform-iot-starterkit
This repository provides information and code for working with SAP Cloud Platform Internet of Things. It enables users to get an end-to-end IoT solution with either real hardware or simulators up and running fast and start their own extensions and usage based on this.
Stars: ✭ 276 (+1871.43%)
Mutual labels:  sample, sample-code, sap-cloud-platform
fiori-elements-feature-showcase
Sample application that demonstrates and documents a broad variety of features of SAP Fiori elements for OData V4. Developers can play around with the new features and learn how to implement them.
Stars: ✭ 76 (+442.86%)
Mutual labels:  sample, sample-code
ui5-service-worker-sample
ui5-service-worker-sample demonstrates how the Service Worker API, available in modern web browsers, could be used in a UI5 app to realize different caching strategies.
Stars: ✭ 16 (+14.29%)
Mutual labels:  sample, sample-code
abap-odata-smoke-test
This ABAP Report performs simple smoke tests for activated ODATA services, providing basic automated testing for your ODATA endpoints.
Stars: ✭ 13 (-7.14%)
Mutual labels:  sample, sample-code
cloud-cap-walkthroughs
This project contains exercises and tutorials for SAP Cloud Application Programming Model.
Stars: ✭ 66 (+371.43%)
Mutual labels:  sample, sap-cloud-platform
hana-ml-samples
This project provides code examples for SAP HANA Predictive and Machine Learning scenarios and is educational content. It covers simple Predictive Analysis Library SQL examples as well as complete SAP HANA design-time “ML scenario”-application content or HANA-ML Python Notebook examples.
Stars: ✭ 67 (+378.57%)
Mutual labels:  sample, sample-code
cloud-cf-espm
A reference application showcasing an end-to-end development scenario in Java on SAP BTP, Cloud Foundry environment.
Stars: ✭ 14 (+0%)
Mutual labels:  sample, sap-cloud-platform
cloud-sdk-ios-samples
SAP Cloud Platform SDK for iOS sample apps demonstrating various components and features of the SDK in the context of bigger apps.
Stars: ✭ 20 (+42.86%)
Mutual labels:  sample, sample-code
cap-sflight
Using SAP Cloud Application Programming Model and SAP Fiori elements to build a simple travel management app, both with Node.js and Java.
Stars: ✭ 65 (+364.29%)
Mutual labels:  sample, sample-code
devtoberfest-2021
The home of Devtoberfest 2021 - an open celebration of what makes us developers - coding and collaboration!
Stars: ✭ 212 (+1414.29%)
Mutual labels:  sample, sample-code
cloud-abap-rap
This repository contains several examples how to develop with the ABAP RESTful Application Programming Model (RAP) in SAP BTP, ABAP environment.
Stars: ✭ 98 (+600%)
Mutual labels:  sample, sample-code
teched2021-developer-keynote
SAP TechEd 2021 Developer Keynote: Improving Developers' Lives.
Stars: ✭ 23 (+64.29%)
Mutual labels:  sample, sample-code
Fiori-for-iOS-Roadshow-2019
A collection of materials for the joined SAP and Apple Roadshow event.
Stars: ✭ 12 (-14.29%)
Mutual labels:  sample, sap-cloud-platform
cloud-espm-cloud-native
Enterprise Sales and Procurement Model (ESPM) Cloud Native is a project that showcases how an application can be made resilient by implementing resilience design patterns. This application is developed using Spring Boot framework and can be deployed locally as well as on SAP BTP, Cloud Foundry environment.
Stars: ✭ 29 (+107.14%)
Mutual labels:  sample, sample-code
cloud-cap-multitenancy
SAP Cloud Application Programming Model (CAP) sample code project with multitenancy using service manager-created SAP HANA containers for tenant data isolation.
Stars: ✭ 33 (+135.71%)
Mutual labels:  sample, sample-code
cloud-cf-helloworld-nodejs
A "Hello World" application for Cloud Foundry using a simple RESTful API in Node.js with persistency in PostgreSQL and SAPUI5 UIs.
Stars: ✭ 45 (+221.43%)
Mutual labels:  sample, sap-cloud-platform

Important Notice

This public repository is read-only and no longer maintained. For the latest sample code repositories, visit the SAP Samples organization.

Functions Node.js - Samples for SAP Cloud Platform Serverless Runtime

REUSE status

Description

In the following the capabilities of the sub component Functions of the SAP Cloud Platform Serverless Runtime (in short: Functions) will be demonstrated. Functions provide a cloud-based serverless framework for the development of decoupled and resilient applications and integration flows (using SAP Cloud Integration) to support asynchronous communication principles. Direct integration with SAP S/4HANA Business Event Handling allows efficient development of innovative and scaling extensions.

This repository provides documentation and samples of how to implement functions (Node.js) on SAP Cloud Platform in the Cloud Foundry environment. Details on each sample application and the covered scenario are described in the table List of content and sample projects below.

For more details about Functions take a look at Functions on SAP Help portal.

List of content and sample projects

Sample/Content Scenario Scenario Description
amqp-echo Basic AMQP 1.0 example An echo function with messaging
ce-coffee Basic CloudEvents example A CloudEvents producing function attached to a CloudEvents trigger
call-other-function Basic example A function calls another function
hello-world-jwt-auth OAuth based token validation by HTTP trigger A valid JWT has to be presented to an HTTP trigger before the function can be triggered
hello-oauth Basic OAuth example The function is triggered by an HTTP request and does OAuth validation of the token using a pre-defined public key
hello-oauth-xsuaa Advanced OAuth example using custom XSUAA The function is triggred by an HTTP request and does OAuth validation of the token using a custom XSUAA instance
hello-secret Basic example A function extracts data from a secret
hello-timer Basic example A function that is triggered according to a CRON expression based schedule
qrcode-producer Basic example A function produces the current timestamp as QR code
s4sdk Advanced example A function leverages the SAP Cloud SDK for JavaScript to interact with the BusinessPartner API exposed by an SAP S/4HANA system
slack-classify-image Advanced example, requires Slack integration An image post in Slack triggers a function. The function classifies the image via SAP Leonardo
weather Advanced example, requires OpenWeatherMap account Two functions representing a simple web page that handles user input and displays the result
kafka-producer Advanced example, requires Kafka broker instance A function is triggered by a message and produces a message on a Kafka topic

Requirements

To run the samples, make sure you have completed the initial setup first.

  1. Install Node.js

    Download and install Node.js(includes npm). The Node.js version must be >= 8.12.x.

  2. Install xfsrt-cli

    Download the binary either from Nexus or from the CP Tools Page.

  3. Install faas-sdk

    Add the SAP NPM Registry to your npm configuration for all @sap scoped modules.

    npm config set "@sap:registry=https://npm.sap.com"

    Installation or update:

    • Linux
      sudo npm install @sap/faas -g
    • Windows (as usual user)
      npm install @sap/faas -g

    Finally, run:

    faas-sdk version

    to test successful installation.

  4. Install CloudFoundry command line tools (CF CLI)

    Download and install the Cloud Foundry CLI.

    Run the command cf login, and login to your Cloud Foundry environment.

    Make sure your SAP Cloud Platform Serverless Runtime service instance and service key exist.

    Further necessary configuration and settings are dependent on the specific sample and are documented there.

Download and Installation

To download and install the samples just clone this repository using this command:

git clone https://github.com/SAP/cloud-function-nodejs-samples

For details on how to configure and run the samples please take a look into the README in the corresponding samples directory.

The file faas.json in each sample directory is used as a manifest. It defines secrets, functions and triggers for one single project.

Debugging using Visual Studio Code

For debugging purposes, the following template launch.json can be adapted and used:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "skipFiles": [
                "<node_internals>/**"
            ],
            "program": "${workspaceFolder}/examples/<specific_example>/node_modules/@sap/faas/lib/cli.js",
            "cwd": "${workspaceFolder}/examples/<specific_example>",
            "args": [
                "run",
                "-y",
                "values.yaml"
            ]
        }
    ]
}

Support

This project is as-is with no support, no changes being made.

License

Copyright (c) 2020 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].