Join us for Code @ Think 2019 | San Francisco | February 12 – 15 Register now Limited availability
Get the code
By Andrea Frittoli | Published December 12, 2018 - Updated December 12, 2018
Are you looking for ways to use cloud resources efficiently and build and deploy applications more quickly?
Serverless, event-driven architectures can execute code that scales automatically in response to demand from a REST API. No code runs until an API call to an endpoint associated to a function is received by the API gateway.
Then application instances are started to match the load needed by each API request exactly.
The code in this repository implements a serverless REST API with IBM Cloud Functions. The REST API is a fully compliant implementation of the Todo-Backend API.
You can deploy it right away using an IBM Cloud Functions deployment script on your own system.
If you haven’t already, sign up for an IBM Cloud account and go to the Cloud Functions dashboard to explore other reference architecture templates and download command line tools, if needed.
The following components are used in this code pattern:
This application is a fully compliant implementation of the Todo-Backend API, with added authentication support.
It demonstrates using IBM Cloud Functions (based on Apache OpenWhisk) to build a REST API. The use case demonstrates how actions work with data services and execute logic in response to API requests. It also demonstrates how to secure the content behind the API using IBM App ID, by requiring an authentication token to access the API.
The authentication is terminated by the API Gateway, so functions do not need to worry about it. Functions receive the JWS token information from the API Gateway and can use it to add content authorisation rules. In this pattern authenticated users are connected to a dedicated Cloudant database, so that each user’s “to do” list is personal and persisted across sessions.
When you use this code pattern, you learn the following skills:
Find detailed technical steps for this code pattern in the README.md file in the GitHub repository.
March 6, 2019
February 7, 2019
Get the Code »
Back to top