From 701377e350e7c675e264d6731bf8f52c02ae2359 Mon Sep 17 00:00:00 2001 From: ejscribner Date: Mon, 20 Dec 2021 11:26:44 -0700 Subject: [PATCH] adding connection and env instructions to readme --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 410f899..db4dce7 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,11 @@ Follow instructions to Setup a new cluster and once the database is running, [in ## Prepare Our Project Folder -We can bootstrap our application. Create a directory and clone the repository on GitHub. +We can bootstrap our application. Create a directory and clone the repository from GitHub. ### Development Guide -1 Clone this repo and install dependencies +1. Clone this repo and install dependencies ```bash git clone https://github.com/couchbaselabs/try-ottoman.git @@ -26,7 +26,17 @@ cd try-ottoman yarn install ``` -3 Run the API example +2. Set up Environment Variables + - Copy the `.env.example` to a new file called `.env` + ``` + cp .env.example .env + ``` + - Set the appropriate variables in the `OTTOMAN_CONNECTION_STRING`: + - The format of the connection string is: `couchbase://:/@:` + - The connection string in `.env.example` will work for a locally hosted Couchbase cluster with username `Administrator` and password `password`. Change the string as needed to fit your cluster. + - This API uses the `travel-sample` bucket, which you'll need to add to your cluster for proper functionality. [Learn more about installing sample buckets here.](https://docs.couchbase.com/server/current/manage/manage-settings/install-sample-buckets.html) + +3. Run the API example ```bash yarn start