{"id":16528355,"url":"https://github.com/danvk/lonely","last_synced_at":"2025-09-12T19:31:38.776Z","repository":{"id":3715287,"uuid":"4787339","full_name":"danvk/lonely","owner":"danvk","description":"Lonely Hangouts: local testing for the Google+ Hangout API","archived":false,"fork":false,"pushed_at":"2014-12-09T17:24:05.000Z","size":420,"stargazers_count":7,"open_issues_count":4,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-03T03:50:13.105Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danvk.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}},"created_at":"2012-06-25T20:57:38.000Z","updated_at":"2024-08-08T14:42:16.000Z","dependencies_parsed_at":"2022-08-24T01:30:37.399Z","dependency_job_id":null,"html_url":"https://github.com/danvk/lonely","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/danvk%2Flonely","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danvk%2Flonely/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danvk%2Flonely/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danvk%2Flonely/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danvk","download_url":"https://codeload.github.com/danvk/lonely/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232780148,"owners_count":18575474,"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-11T17:39:57.239Z","updated_at":"2025-01-06T19:58:37.337Z","avatar_url":"https://github.com/danvk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Lonely Hangouts\n\n*Local testing for the Google+ Hangouts API\u003cbr\u003e\nBy Dan Vanderkam*\n\nGoogle+ Hangouts provide an API very reminiscent of the Google Wave Gadgets\nAPI, which later became the Google Shared Spaces API. This API makes it easy to\ncreate collaborative web apps without worrying about backend synchronization or\nedit conflicts.\n\nThe API is great, but the iteration process (which requires pushing everything\nto an external server or two) leaves something to be desired.\n\nIt's also difficult to test multiplayer scenarios because you need a separate\nGoogle+ account and a separate computer for each player.\n\nWhile developing [Puzzle+](https://github.com/danvk/puzzleplus), this became\nfrustrating enough that I developed Lonely Hangouts as a workaround. It solves\nboth of these problems by letting you hang out all by yourself (hence the\nname!). It provides a node.js server which emulates a portion of the Google+\nHangouts API. It does not require accounts and loads all resources from local\ndisk.\n\n\n#### Installation\n\nLonely Hangouts requires node.js.\n\nOnce you have node, run:\n\n    npm install lonely\n\n\n#### Usage\n\nTo use Lonely Hangouts, run:\n\n    ./node_modules/.bin/lonely your_app.xml\n\nThen connect to http://localhost:8080 in your browser. You can open the URL in\nan incognito window or another browser to create a second user.\n\nFor a quick demo, you can try cloning this repo and running:\n\n    ./lonely.js demos/basic.xml\n\nIf you change your XML file or any of the resources that it includes, you'll\nneed to refresh the page in your browser. This will not erase the existing app\nstate.\n\nFor extra-speedy testing, Lonely has a single player mode:\n\n    ./node_modules/.bin/lonely.js --single your_app.xml\n\nNow you can only create a single user, but there is no server-side state. This\nlets you iterate on your layout and design just like you would in a normal web\npage.\n\n\n#### Rewrites\n\nIn a published Hangout App, resources must be hosted at a public https\nlocation. But for local development, it's much more convenient to use local\nversions of the resources.\n\nTo accomodate this, Lonely uses simple rewrites. Write out the full external\npath in your XML file, then specify a rewrite which converts it to a local\npath. When you run the App with Lonely, the rewrites will be used. When you\npush the XML file to G+, the rewrites will be ignored.\n\nHere's what a rewrite looks like (see also demos/basic.xml):\n\n    \u003c!-- lonely\n    {\n    rewrites: [\n      {\n        from: \"https://raw.github.com/danvk/lonely/master/\",\n        to: \"\"\n      }\n    ]\n    }\n    --\u003e\n\nThis is nothing more than a search/replace. It will change script sources,\nimage sources and JavaScript sources, but also links and URLs in plain text.\n\nPaths are relative to the directory from which you started the server.\n\n\n#### Remaining work\n\nThere are _many_ methods of the G+ Hangouts API which are not currently\nimplemented in Lonely Hangouts. For a complete API reference, see:\nhttps://developers.google.com/+/hangouts/api/\n\nOther useful features would include:\n\n  - A \"reset state\" button\n  - A facility for saving/restoring state\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanvk%2Flonely","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanvk%2Flonely","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanvk%2Flonely/lists"}