{"id":16578120,"url":"https://github.com/glynnbird/envoy-serverless","last_synced_at":"2025-08-01T17:38:36.831Z","repository":{"id":138315676,"uuid":"91692433","full_name":"glynnbird/envoy-serverless","owner":"glynnbird","description":"OpenWhisk version of Cloudant Envoy","archived":false,"fork":false,"pushed_at":"2017-05-25T12:58:13.000Z","size":14,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T04:22:48.306Z","etag":null,"topics":["cloudant","couchdb","envoy","openwhisk"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/glynnbird.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-18T12:47:36.000Z","updated_at":"2023-12-16T09:04:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"dd9fd825-b58d-4b8b-95ee-f37a1002da1b","html_url":"https://github.com/glynnbird/envoy-serverless","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/glynnbird/envoy-serverless","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glynnbird%2Fenvoy-serverless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glynnbird%2Fenvoy-serverless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glynnbird%2Fenvoy-serverless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glynnbird%2Fenvoy-serverless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glynnbird","download_url":"https://codeload.github.com/glynnbird/envoy-serverless/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glynnbird%2Fenvoy-serverless/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268269274,"owners_count":24223219,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudant","couchdb","envoy","openwhisk"],"created_at":"2024-10-11T22:13:09.648Z","updated_at":"2025-08-01T17:38:36.823Z","avatar_url":"https://github.com/glynnbird.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# envoy-serverless\n\nA version of [Cloudant Envoy](https://github.com/cloudant-labs/envoy) that deploys to a IBM OpenWhisk - a serverless computing platform. Having Envoy run in a serverless environment has several advantages:\n\n- you only pay for what you use\n- the OpenWhisk API system handles authentication, including social media oAuth\n- OpenWhisk handles the traffic scaling \n\n## Prerequisites\n\nClone this repository\n\n    git clone https://github.com/glynnbird/envoy-serverless.git\n    cd envoy-serverless\n\n[Sign up for a Bluemix account](https://bluemix.net) and follow the [Getting Started with OpenWhisk guide](https://console.ng.bluemix.net/openwhisk/getting-started) to download the `wsk` tool and configure it for your Bluemix account.\n\nIn your Bluemix dashboard, create a Cloudant service and make a note of its URL. In the Cloudant dashboard, create a new empty database (say, 'envoydb').\n\n## Installation\n\nCreate two environment variables containing your Cloudant URL and the database name:\n\n    export COUCH_HOST=\"https://USERNAME:PASSWORD@HOST.cloudant.com\"\n    export ENVOY_DATABASE_NAME=\"envoydb\"\n\nand run the deployment script:\n\n    ./deploy.sh\n\nThe URL of your service will look something like this:\n\n    https://service.us.apiconnect.ibmcloud.com/gws/apigateway/api/YOURSERVICEID/envoy/envoydb\n\nYou can now visit the \"API Management\" section of your OpenWhisk dashboard:\n\n- in the \"Definition\" tab, tick the box titled: \"Require consuming applications to authenticate via API key\"\n- in the \"Sharing\" tab, create an API key\n\n## Running    \n\nYou can test your service with `curl`:\n\n```sh\n\u003e curl -H 'x-ibm-client-id: 0bd929c9-c8b7-43f7-856f-f2cbe33b9f50' \\ 'https://service.us.apiconnect.ibmcloud.com/gws/apigateway/api/YOURSERVICEID/envoy/envoydb'\n{ ... some json .... }\n```\n\nor from PouchDB:\n\n```js\nvar PouchDB = require('pouchdb');\nvar url = 'https://service.us.apiconnect.ibmcloud.com/gws/apigateway/api/YOURSERVICEID/envoy/envoydb';\nvar opts = {\n  ajax: { \n    headers: { \n      'x-ibm-client-id': '60eaa0b0-0b84-4b02-abb1-726605890233'\n    }\n  }\n};\nvar remotedb = new PouchDB(url, opts);\n\nvar envoydb = new PouchDB('envoydb')\nenvoydb.replicate.from(remotedb).on('change', function (info) {\n  // handle change\n  console.log('change', info)\n}).on('paused', function (err) {\n  console.log('paused', err)\n}).on('active', function () {\n  console.log('active')\n}).on('denied', function (err) {\n  console.log('denied', err)\n}).on('complete', function (info) {\n console.log('complete', info)\n}).on('error', function (err) {\n  console.log('error', err);\n});\n```\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglynnbird%2Fenvoy-serverless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglynnbird%2Fenvoy-serverless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglynnbird%2Fenvoy-serverless/lists"}