Skip to content

A sample and tutorial to develop server-side Swift apps with Kitura, REST API and a database on Bluemix

License

Notifications You must be signed in to change notification settings

IBM-Cloud/get-started-swift

Repository files navigation

Build Status - Master macOS Linux

Getting started with Swift on IBM Cloud

The Getting Started tutorial for Swift uses this sample application to provide you with a sample workflow for working with any Swift app; you set up a development environment, deploy an app locally and on the cloud, and then integrate an IBM Cloud database service in your app.

The Swift app uses the Kitura Web Framework and a Cloudant NoSQL DB to illustrate how to store information in a database and then return information from a database to the UI. To learn more about how the app connects to Cloudant, see the Kitura CouchDB Library.

Alternatively, this app can connect to a MongoDB service. As described, this functionality requires the libressl, which is needed when running the application locally on macOS, even if using Cloudant. Install it with brew install libressl.

Gif of the sample app contains a title that says, Welcome, a prompt asking the user to enter their name, and a list of the database contents which are the names Joe, Jane, and Bob. The user enters the name, Mary and the screen refreshes to display, Hello, Mary, I've added you to the database. The database contents listed are now Mary, Joe, Jane, and Bob.

The following steps are the general procedure to set up and deploy your app to IBM Cloud. See more detailed instructions in the Getting started tutorial for Swift.

Before you begin

You'll need a IBM Cloud account, Git, IBM Cloud CLI, and Swift installed.