Using Your Own Domain Name With Cloudant

Secure your custom domain using serverless functions on the IBM Cloud

Glynn Bird
Dec 7, 2017 · 3 min read
A serverless proxy for Cloudant, hosted on the IBM Cloud Functions platform.

Prequisites

First we need the source code. You’ll need the git tool and to be familiar with command-line tools:

git clone https://github.com/ibm-watson-data-lab/serverless-proxy.git
cd serverless-proxy

Installation

Before we deploy our code, we need to define the following:

  • the name of the database we are working with
export COUCH_HOST="https://USERNAME:PASSWORD@HOST.cloudant.com"
export COUCH_DATABASE="mydb"
./deploy.sh
  • only allow those who have an OAuth cookie
  • rate-limit requests per user

Secure your traffic

To use a custom domain, first you need a domain name. I created a subdomain: mycloudant.glynnbird.com. You need to configure the DNS for that domain name using the instructions here.

IBM CODAIT

Things we made with data at IBM’s Center for Open Source Data and AI Technologies.

Glynn Bird

Written by

Developer @ IBM. https://glynnbird.com

IBM CODAIT

Things we made with data at IBM’s Center for Open Source Data and AI Technologies.