TodoList implemented with Redis
Swift
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Images
Sources
Tests fixed tests Jan 4, 2017
.cfignore
.gitignore
.gitmodules
.swift-version
.travis.yml
Package.swift
README.md
manifest.yml

README.md

TodoList Redis

Build Status Swift 3.0.2

Implements the TodoListAPI for TodoList. Uses the Kitura-Redis library for interfacing with Redis.

Quick start:

  1. Download Swift 3

  2. Download redis You can use brew install redis or apt-get install redis-server

  3. Clone the TodoList Redis repository git clone https://github.com/IBM-Swift/todolist-redis

  4. Compile the library with swift build or create an Xcode project with swift package generate-xcodeproj

  5. Run the test cases with swift test or directly from XCode

Deploying to Bluemix

Deploy to Bluemix Button

You can use this button to deploy TodoList to your Bluemix account, all from the browser. The button will create the application, create and bind any services specified in the manifest.yml file and deploy.

Deploy to Bluemix

Manually

Bluemix is a hosting platform from IBM that makes it easy to deploy your app to the cloud. Bluemix also provides various popular databases, including Redis.

  1. Get an account for Bluemix

  2. Download and install the Cloud Foundry tools:

    cf api https://api.ng.bluemix.net
    cf login
    

    Be sure to run this in the directory where the manifest.yml file is located.

  3. Create your Cloudant Service

    cf create-service compose-for-redis Standard todolist-redis
    
  4. Run cf push

    **Note* This step will take 3-5 minutes

    2 of 2 instances running 
    
    App started
    
  5. Get the credential information:

    cf env TodoListRedisApp
    

    Note you will see something similar to the following, note the uri, which contains all the vital information:

    "VCAP_SERVICES": {
        "compose-for-redis": [{
            "credentials": {
                "db_type": "redis",
                "deployment_id": "585d53d73fbf6400180032c1",
                "name": "bmix_dal_yp_e6c60498_e5f2_4f20_a456_67bf4d627612",
                "uri": "redis://<user>:<password>@bluemix-sandbox-dal-9-portal.4.dblayer.com:20888",
                "uri_cli": "redis-cli -h bluemix-sandbox-dal-9-portal.4.dblayer.com -p 20888 -a <password>"
            },
        }]
    }

    Additionally, when you access the route for your application, you should see the empty brackets, denoting an empty data store.