{"id":18031715,"url":"https://github.com/stevekrouse/cloud-data","last_synced_at":"2025-10-13T16:07:53.652Z","repository":{"id":149825054,"uuid":"64244404","full_name":"stevekrouse/cloud-data","owner":"stevekrouse","description":null,"archived":false,"fork":false,"pushed_at":"2016-11-05T12:38:25.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T14:17:54.590Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stevekrouse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2016-07-26T18:21:23.000Z","updated_at":"2016-07-26T18:22:47.000Z","dependencies_parsed_at":"2023-04-28T05:34:08.243Z","dependency_job_id":null,"html_url":"https://github.com/stevekrouse/cloud-data","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevekrouse%2Fcloud-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevekrouse%2Fcloud-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevekrouse%2Fcloud-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevekrouse%2Fcloud-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stevekrouse","download_url":"https://codeload.github.com/stevekrouse/cloud-data/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256072,"owners_count":20909240,"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","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":"2024-10-30T10:10:29.324Z","updated_at":"2025-10-13T16:07:48.612Z","avatar_url":"https://github.com/stevekrouse.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloud Data\n \t\t\n Cloud data can be used to create chat apps, high scores, logins, and multiplayer games.\t\t\n \t\t\n 1) Login to [Firebase](https://firebase.google.com/) with your Google account.\t\t\n \t\t\n 2) Create a new project.\n \t\t\n 3) Make reading and writing to your database possible via the Database rules tab.\t\t\n \n 4) Add Cloud Data to your HTML between your `\u003chead\u003e` tags:\n \n ```html\n \u003cscript src=\" https://cdn.rawgit.com/stevekrouse/cloud-data/445dfd6dcfc82fa7d0ded3b886e4b5e106b28524/cloud-data.js\"\u003e\u003c/script\u003e\n ```\n \t\t\n 4) Create a new database:\t\n \t\t\n ```javascript\t\t\n var database = new CloudData({\t\t\n     apiKey: \"AIzaSyAWa4XzsdE5haWBWq4fTef2Ko1dpbsE4qM\",\t\t\n     authDomain: \"sample-a81f9.firebaseapp.com\",\t\t\n     databaseURL: \"https://sample-a81f9.firebaseio.com\",\t\t\n     storageBucket: \"\",\t\t\n });\t\t\n ```\t\t\n \t\t\n 5) Set some data:\t\t\n \t\t\n ```javascript\t\t\n database.set(\"highScore\", 100)\n database.set(\"player1\", {x: mouseX, y: mouseY})\n ```\t\t\n \n 6) Add to a list:\t\t\n \t\t\n ```javascript\t\t\n database.addToList(\"messages\", {name: \"Steve\", message: \"Think different\"}) \t\n ```\n \t\t\n 7) Get some data:\t\t\n \t\t\n ```javascript\t\t\n database.get(\"highScore\", 0)         // returns 100, with a default of 0\t\t\n database.get(\"player1\", {x: 0, y: 0}) // returns  {x: 14, y: 104}, with a default of {x: 0, y: 0}\t\t\n database.get(\"messages\", [])          // returns [{name: \"Steve\", message: \"Think different\"}], with a default of []\n ```\n\n 7) React when the data changes:\t\t\n \t\t\n ```javascript\t\t\n var highScore = database.get(\"highScore\")\n database.onChange(() =\u003e {\n  highScore = database.get(\"highScore\")\n })\n ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevekrouse%2Fcloud-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstevekrouse%2Fcloud-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevekrouse%2Fcloud-data/lists"}