{"id":39076958,"url":"https://github.com/cloud-gov/node-cosmodb-demo","last_synced_at":"2026-01-17T18:27:22.475Z","repository":{"id":38023749,"uuid":"273254535","full_name":"cloud-gov/node-cosmodb-demo","owner":"cloud-gov","description":"A simple ExpressJS app demonstrating how to use Azure's Cosmo DB with cloud.gov","archived":false,"fork":false,"pushed_at":"2023-06-24T03:53:19.000Z","size":62,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2023-06-26T01:05:28.175Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloud-gov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-18T14:05:20.000Z","updated_at":"2023-06-26T01:05:28.176Z","dependencies_parsed_at":"2023-01-29T00:01:21.906Z","dependency_job_id":null,"html_url":"https://github.com/cloud-gov/node-cosmodb-demo","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/cloud-gov/node-cosmodb-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fnode-cosmodb-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fnode-cosmodb-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fnode-cosmodb-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fnode-cosmodb-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloud-gov","download_url":"https://codeload.github.com/cloud-gov/node-cosmodb-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fnode-cosmodb-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28515490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T17:57:59.192Z","status":"ssl_error","status_checked_at":"2026-01-17T17:57:52.527Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-17T18:27:21.678Z","updated_at":"2026-01-17T18:27:22.463Z","avatar_url":"https://github.com/cloud-gov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node.js Cosmo DB Demo App\n\nA simple [ExpressJS](https://expressjs.com/) app demonstrating how to use [Azure's Cosmo DB](https://azure.microsoft.com/en-us/services/cosmos-db/) with cloud.gov.\n\n## Usage\n\nClone this repo and deploy your app to cloud.gov without starting it:\n\n```\n~$ clone https://github.com/cloud-gov/node-cosmodb-demo.git\n~$ cd node-cosmodb-demo\n~$ cf push --no-start\n```\n\nSign up for Azure and create a new Cosmo DB Account.\n\nIn the Azure Portal, when viewing the details of your Cosmo DB account, go to `Settings` \u003e\u003e `Connection String` and obtain the following values:\n\n* USERNAME\n* PRIMARY PASSWORD\n* PORT\n\nCreate a user-provided service instance in cloud.gov to hold these credentials:\n\n```\n~$ cf cups COSMO_DB_SERVICE -p '{\"user\":\"USERNAME\",\"password\":\"PRIMARY PASSWORD\", \"port\": \"PORT\"}'\n```\n\nBind the application to the new user-provided service instance:\n\n```\n~$ cf bind-service node-cosmodb-demo COSMO_DB_SERVICE\n```\n\nStart your application:\n\n```\n~$ cf restage node-cosmodb-demo\n```\n\nAfter the app starts, make sure it is running and obtain the route:\n\n```\n~$ cf app node-cosmodb-demo\n```\n\nYou should see output like the following: \n\n```\nname:              node-cosmodb-demo\nrequested state:   started\nroutes:            node-cosmodb-demo-boisterous-sitatunga.app.cloud.gov\nlast uploaded:     Thu 18 Jun 09:45:58 EDT 2020\nstack:             cflinuxfs3\nbuildpacks:        nodejs\n\ntype:           web\ninstances:      1/1\nmemory usage:   256M\n     state     since                  cpu    memory          disk          details\n#0   running   2020-06-18T13:46:10Z   0.2%   29.3M of 256M   90.1M of 1G   \n```\n\nYou can insert documents in your Cosmo DB instance by doing something similar to:\n\n```\n~$ curl -X POST https://{your-app-route}.app.cloud.gov/save/db-name/collection-name \\\n -d '[{\"foo\":\"bar\"},{\"bar\":\"foo\"}]' \\\n -H 'Content-type: application/json'\n```\n\nNote - You can change the `db-name` and `collection-name` segments in the route you POST to to designate with db and collection documents get stored in.\n\n## A Note on Compliance\n\nWhen you use cloud.gov in general, your application inherits the compliance of the [cloud.gov FedRAMP P-ATO](https://cloud.gov/docs/overview/fedramp-tracker/), which inherits compliance from the AWS GovCloud FedRAMP P-ATO.  When you use this Cosmo DB, you opt into using an Azure service that is not in the cloud.gov FedRAMP P-ATO boundary, but is in the [Azure FedRAMP boundary](https://docs.microsoft.com/en-us/azure/azure-government/compliance/azure-services-in-fedramp-auditscope).\n\nYou are responsible for obtaining appropriate authorization from your agency to use Cosmo DB for your system. The appropriate steps depend on your agency; they may include discussing this with your Authorizing Official and documenting it as part of your ATO (for example as part of [SC-12](https://nvd.nist.gov/800-53/Rev4/control/SC-12) or [SA-9](https://nvd.nist.gov/800-53/Rev4/control/SA-9)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud-gov%2Fnode-cosmodb-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloud-gov%2Fnode-cosmodb-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud-gov%2Fnode-cosmodb-demo/lists"}