{"__v":37,"_id":"54cfc0b0bba1a023008741c9","category":{"__v":4,"_id":"54cfb99bbba1a023008741af","pages":["54cfbacd5ff7e617002bbd8a","54cfbd635ff7e617002bbd90","54cfbf6e3995cf0d0006f6fc","54cfc0b0bba1a023008741c9"],"project":"54cf411f9d09bb0d00a17a1c","version":"54cf411f9d09bb0d00a17a1f","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-02-02T17:53:31.393Z","from_sync":false,"order":0,"slug":"getting-started","title":"Getting Started"},"parentDoc":null,"project":"54cf411f9d09bb0d00a17a1c","user":"54cfa8c8a8a4fd0d00b7fd1c","version":{"__v":14,"_id":"54cf411f9d09bb0d00a17a1f","project":"54cf411f9d09bb0d00a17a1c","createdAt":"2015-02-02T09:19:27.656Z","releaseDate":"2015-02-02T09:19:27.656Z","categories":["54cf41209d09bb0d00a17a20","54cfb99bbba1a023008741af","54cfb9a65ff7e617002bbd7f","54cfba03bba1a023008741b6","54cfba0ebba1a023008741b8","54cfba19bba1a023008741b9","54cfba29bba1a023008741bb","54cfba345ff7e617002bbd87","54cfba3ebba1a023008741bc","54cfba473995cf0d0006f6f0","54e371b18ef7552300409bf2","54e37aa5e887c50d005ef629","555a4e9b147f91190092d137","56b0e91802f4bc0d006ce254"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":["5898a97eec49fb0f004c24cc","58dd3238a27767190078851c"],"next":{"pages":[],"description":""},"createdAt":"2015-02-02T18:23:44.934Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"[block:embed]\n{\n  \"html\": \"<iframe class=\\\"embedly-embed\\\" src=\\\"//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fk4cC0UntnkI%3Ffeature%3Doembed&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dk4cC0UntnkI%26feature%3Dyoutu.be&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fk4cC0UntnkI%2Fhqdefault.jpg&key=02466f963b9b4bb8845a05b53d3235d7&type=text%2Fhtml&schema=youtube\\\" width=\\\"854\\\" height=\\\"480\\\" scrolling=\\\"no\\\" frameborder=\\\"0\\\" allowfullscreen></iframe>\",\n  \"url\": \"https://www.youtube.com/watch?v=k4cC0UntnkI&feature=youtu.be\",\n  \"title\": \"Sharing a Workspace\",\n  \"favicon\": \"https://s.ytimg.com/yts/img/favicon-vflz7uhzw.ico\",\n  \"image\": \"https://i.ytimg.com/vi/k4cC0UntnkI/hqdefault.jpg\"\n}\n[/block]\nAs you develop your application, often you just want to quickly demo your work-in-progress to a colleague, customer, or friend. You may also want to pull in a fellow dev to debug an issue or to pair program.\n\nCloud9 enables you to do just these things, easily: share your entire development environment, the running application, or just a preview of your running application. Here we describe how to access these options, and how to use each.\n\n# Share Dialog\n---\n\nThe best place to start sharing is from the dedicated \"Share\" dialog. Access it via the \"Share\" button on the right top of the IDE, or via the menu in Window > Share...\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/TwiSDOZQ3GaI4vOMa9V6_Screen%20Shot%202015-02-18%20at%207.53.41%20AM.png\",\n        \"Screen Shot 2015-02-18 at 7.53.41 AM.png\",\n        \"1020\",\n        \"135\",\n        \"#6098d1\",\n        \"\"\n      ],\n      \"caption\": \"share buttons\"\n    }\n  ]\n}\n[/block]\nHere's what you see when you pull up the Share dialog:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/9F1AN4WMTi2TNY8xnkiw_Screen%20Shot%202015-02-18%20at%207.55.09%20AM.png\",\n        \"Screen Shot 2015-02-18 at 7.55.09 AM.png\",\n        \"567\",\n        \"610\",\n        \"#708194\",\n        \"\"\n      ],\n      \"caption\": \"share workspace window dialog\"\n    }\n  ]\n}\n[/block]\n**Links to share**\n\n  * Editor: see section \"Share your development environment\"\n  * Application: see section \"Share your application\"\nIf you enable the \"Public\" checkbox for an option, it will make the URL accessible for anyone with the URL. For public workspaces all these URLs are public by default, but for private workspaces you have to enable them manually.\n\n**Who has access**\n\nThis section refers to people you have specifically granted access to your entire development environment. (R) gives Read access only to that person: the ability to open and view files, and to run your code. (RW) or \"Read/Write\" also gives that person the ability to write to files.\n\n**Invite people**\n\nThis section enables you to invite people to your workspace and immediately set if they have just \"Read\" or \"Read+Write\" rights. You can invite people by their email address or Cloud9 username. You can also choose whether or not send an automatic email to that person that they've been invited to your workspace.\n\n# Collaboration Features\n---\n\nCloud9's Collaboration features allow you to share your entire development environment so you can work on code together, much like working on a document in Google Docs. You'll actually be able to see each other's cursor as you type, run your app, share the Terminal(s), and talk in the group chat. You'll also see which lines were contributed by other users from the colored lines on the left side of your file (this can be turned on/off from Workspace preferences > User Settings > General > Collaboration > Show authorship info). See the screenshot below for what this looks like:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/EWMAXKfQKyu110Ua603Q_collab.png\",\n        \"collab.png\",\n        \"890\",\n        \"550\",\n        \"#bfa395\",\n        \"\"\n      ],\n      \"caption\": \"editor collaboration cloud9\"\n    }\n  ]\n}\n[/block]\n# Share Your Development Environment\n---\n\nIn order to share your entire development environment, do one of the following:\n\n  1. Make the URL publicly available to everyone: check the \"Public\" checkbox for the \"Editor\" in the \"Links to Share\" section.\n  2. Choose to share only with specific people: invite them from the \"Invite people\" section.\n  3. Grant/revoke access rights in the \"Who has access\" section.\nIf someone asks for either Read or Read+Write access to your workspace, you can accept or deny them from the Collaboration panel on the right.\n\nNote: alternatively you can just share the URL to your workspace from the browser's URL bar and accept members as they request access to your workspace\n\n# Share Your Application\n---\n\nIf you Run your application the result can be shared by copying the URL from the dialog. This URL can only be viewed if it's made Public by checking the \"Public\" checkbox next to the \"Application\" in the \"Links to share\" section.\n\nPeople who have full read access to your workspace (as defined in the \"Who has access\") can view this URL whether it's public or not.\n\n## Share a Preview\n\nIf you Preview a file in your application, it can be shared by copying the URL from the dialog. This URL can only be viewed if it's made Public by checking the \"Public\" checkbox next to the \"Preview\" in the \"Links to share\" section.\n\nPeople who have full read access to your workspace (as defined in the \"Who has access\") can view this URL whether it's public or not.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"If you can't find how to preview your running app, try to use port 8080 in the URL.\",\n  \"title\": \"Port 8080\"\n}\n[/block]\n## Make a Workspace Private\n\nOpen the workspace and press the Share button on the top right. In the opened dialog, you specify the visibility on three levels. On the 'editor' line, remove the checkmark at 'public'. If your plan does not have any private workspaces left, this will not work.\n\n## Share a Single Directory\n\nThis can be done by starting a small http server in that directory and make sure that the running application is public.\n\nTo make the running application public you have to click the \"Share\" button at the top right and then check \"public\" for application.\n\nTo run the server open a terminal and do:\n`$ cd /dir/i/want/to/share`\n`$ python3 -m http.server 8080`\n\n### Can collaborators work on different git branches in the same workspace?\n\nNo, and yes. Fundamentally, the nature of a git branch makes this so it is not possible. Checking out a separate branch of a repository simply takes all the differences of that branch and applies them to the files on the system. Because of this, when a user checks out a branch in a workspace, it changes the files and anyone accessing those files will see those changes/that branch. This is the same behavior on a local machine.\n\nAs a workaround, you may have separate directories for different branches or users. This won't change the behavior but will allow users to change files without other users seeing that change (unless they're in the same directory).\n\n## See Also\n- [Lost Code](https://community.c9.io/t/code-disappeared-or-lost/671?utm_source=docs.c9.io&utm_medium=article&utm_campaign=FAQ)\n- [Remove Project from Shared with Me Page](https://community.c9.io/t/remove-myself-from-a-workspace/1885)\n\n<div style=\"text-align: center;\"><a target=\"_blank\" href=\"https://community.c9.io/t/documentation-share-a-workspace/1455?utm_source=docs.c9.io&utm_medium=article&utm_campaign=Docs%2BFeedback\" class=\"button info solid\">Submit feedback or questions about this page</a></div>","excerpt":"","slug":"share-a-workspace","type":"basic","title":"Share a Workspace"}
[block:embed] { "html": "<iframe class=\"embedly-embed\" src=\"//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fk4cC0UntnkI%3Ffeature%3Doembed&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dk4cC0UntnkI%26feature%3Dyoutu.be&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fk4cC0UntnkI%2Fhqdefault.jpg&key=02466f963b9b4bb8845a05b53d3235d7&type=text%2Fhtml&schema=youtube\" width=\"854\" height=\"480\" scrolling=\"no\" frameborder=\"0\" allowfullscreen></iframe>", "url": "https://www.youtube.com/watch?v=k4cC0UntnkI&feature=youtu.be", "title": "Sharing a Workspace", "favicon": "https://s.ytimg.com/yts/img/favicon-vflz7uhzw.ico", "image": "https://i.ytimg.com/vi/k4cC0UntnkI/hqdefault.jpg" } [/block] As you develop your application, often you just want to quickly demo your work-in-progress to a colleague, customer, or friend. You may also want to pull in a fellow dev to debug an issue or to pair program. Cloud9 enables you to do just these things, easily: share your entire development environment, the running application, or just a preview of your running application. Here we describe how to access these options, and how to use each. # Share Dialog --- The best place to start sharing is from the dedicated "Share" dialog. Access it via the "Share" button on the right top of the IDE, or via the menu in Window > Share... [block:image] { "images": [ { "image": [ "https://files.readme.io/TwiSDOZQ3GaI4vOMa9V6_Screen%20Shot%202015-02-18%20at%207.53.41%20AM.png", "Screen Shot 2015-02-18 at 7.53.41 AM.png", "1020", "135", "#6098d1", "" ], "caption": "share buttons" } ] } [/block] Here's what you see when you pull up the Share dialog: [block:image] { "images": [ { "image": [ "https://files.readme.io/9F1AN4WMTi2TNY8xnkiw_Screen%20Shot%202015-02-18%20at%207.55.09%20AM.png", "Screen Shot 2015-02-18 at 7.55.09 AM.png", "567", "610", "#708194", "" ], "caption": "share workspace window dialog" } ] } [/block] **Links to share** * Editor: see section "Share your development environment" * Application: see section "Share your application" If you enable the "Public" checkbox for an option, it will make the URL accessible for anyone with the URL. For public workspaces all these URLs are public by default, but for private workspaces you have to enable them manually. **Who has access** This section refers to people you have specifically granted access to your entire development environment. (R) gives Read access only to that person: the ability to open and view files, and to run your code. (RW) or "Read/Write" also gives that person the ability to write to files. **Invite people** This section enables you to invite people to your workspace and immediately set if they have just "Read" or "Read+Write" rights. You can invite people by their email address or Cloud9 username. You can also choose whether or not send an automatic email to that person that they've been invited to your workspace. # Collaboration Features --- Cloud9's Collaboration features allow you to share your entire development environment so you can work on code together, much like working on a document in Google Docs. You'll actually be able to see each other's cursor as you type, run your app, share the Terminal(s), and talk in the group chat. You'll also see which lines were contributed by other users from the colored lines on the left side of your file (this can be turned on/off from Workspace preferences > User Settings > General > Collaboration > Show authorship info). See the screenshot below for what this looks like: [block:image] { "images": [ { "image": [ "https://files.readme.io/EWMAXKfQKyu110Ua603Q_collab.png", "collab.png", "890", "550", "#bfa395", "" ], "caption": "editor collaboration cloud9" } ] } [/block] # Share Your Development Environment --- In order to share your entire development environment, do one of the following: 1. Make the URL publicly available to everyone: check the "Public" checkbox for the "Editor" in the "Links to Share" section. 2. Choose to share only with specific people: invite them from the "Invite people" section. 3. Grant/revoke access rights in the "Who has access" section. If someone asks for either Read or Read+Write access to your workspace, you can accept or deny them from the Collaboration panel on the right. Note: alternatively you can just share the URL to your workspace from the browser's URL bar and accept members as they request access to your workspace # Share Your Application --- If you Run your application the result can be shared by copying the URL from the dialog. This URL can only be viewed if it's made Public by checking the "Public" checkbox next to the "Application" in the "Links to share" section. People who have full read access to your workspace (as defined in the "Who has access") can view this URL whether it's public or not. ## Share a Preview If you Preview a file in your application, it can be shared by copying the URL from the dialog. This URL can only be viewed if it's made Public by checking the "Public" checkbox next to the "Preview" in the "Links to share" section. People who have full read access to your workspace (as defined in the "Who has access") can view this URL whether it's public or not. [block:callout] { "type": "info", "body": "If you can't find how to preview your running app, try to use port 8080 in the URL.", "title": "Port 8080" } [/block] ## Make a Workspace Private Open the workspace and press the Share button on the top right. In the opened dialog, you specify the visibility on three levels. On the 'editor' line, remove the checkmark at 'public'. If your plan does not have any private workspaces left, this will not work. ## Share a Single Directory This can be done by starting a small http server in that directory and make sure that the running application is public. To make the running application public you have to click the "Share" button at the top right and then check "public" for application. To run the server open a terminal and do: `$ cd /dir/i/want/to/share` `$ python3 -m http.server 8080` ### Can collaborators work on different git branches in the same workspace? No, and yes. Fundamentally, the nature of a git branch makes this so it is not possible. Checking out a separate branch of a repository simply takes all the differences of that branch and applies them to the files on the system. Because of this, when a user checks out a branch in a workspace, it changes the files and anyone accessing those files will see those changes/that branch. This is the same behavior on a local machine. As a workaround, you may have separate directories for different branches or users. This won't change the behavior but will allow users to change files without other users seeing that change (unless they're in the same directory). ## See Also - [Lost Code](https://community.c9.io/t/code-disappeared-or-lost/671?utm_source=docs.c9.io&utm_medium=article&utm_campaign=FAQ) - [Remove Project from Shared with Me Page](https://community.c9.io/t/remove-myself-from-a-workspace/1885) <div style="text-align: center;"><a target="_blank" href="https://community.c9.io/t/documentation-share-a-workspace/1455?utm_source=docs.c9.io&utm_medium=article&utm_campaign=Docs%2BFeedback" class="button info solid">Submit feedback or questions about this page</a></div>