page-brochureware.php

Create a Swift Web App

Swift Web Application Overview

Web Applications are fundamental components of cloud computing. Used to provide a variety of data, web apps present information from server-side components and servers to be consumed by client-side applications, such as a web browser. This tutorial provides an overview of the basic Swift Web App, describing how to create it, its features and properties, and possible extension points with services from IBM Cloud.


Create an Application

There are two ways of creating a Swift Web Application, as shown in the Getting Started with Swift applications tutorial. If using the CLI method, select the Web pattern option, followed by the Basic option, specifying Swift as the desired language. Using the App Service Console, the same basic web app will be generated by selecting the Swift Kitura Basic tile.


Endpoints

The basic Swift Kitura Web App comes with two endpoints by default:

  • Performing a GET against default endpoint will return a HTML response, rendering the Kitura framework default page. Running locally, it can be accessed at localhost:8080/.
  • The health endpoint provides an easy way to query the application status. It will return a JSON response to a GET request, consisting of a “status” key with a corresponding value of “UP”. Running locally, it can be accessed at localhost:8080/health.

Services

IBM Cloud features a diverse suite of services that provide solutions for the cloud computing needs of application developers. To showcase these features, the Swift Web Application provides scaffolding code to connect with the selected services and facilitate development efforts. For a list of supported services and to learn more about the capabilities of IBM Cloud, visit the official App Service documentation.