These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Code Autocompletion
-
For Javascript programs, Cloud9 IDE provides intelligent and responsive autocompletion for your code. Autocompletion is based not only on the content within your files, but also on the ECMAScript and Node.js standard library:
-
-
Methods defined in ECMAScript and Node.js also have documentation provided for you. Simply hover over a method name for a moment, and a second box quickly shows some additional information.
-
You can disable autocompletion in the Settings menu.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/cloud9-user-documentation.json b/out/cloud9-user-documentation.json
deleted file mode 100644
index 76207ae..0000000
--- a/out/cloud9-user-documentation.json
+++ /dev/null
@@ -1,463 +0,0 @@
-{
- "files": [
- {
- "filename": "deploying_code",
- "mtime": 1412172002000,
- "pageTitle": "Deploying Your Code",
- "contents": "\n
Deploying Your Code
\n
Cloud9 IDE offers many different ways to get your code from your editor to your \nproduction server. To deploy your code, click on the Deploy button in the \nProject Bar:
\n
\n
We offer tight integration with the following environments:
Following these links will provide you with more information on code deployment.\nYou can deploy your code to as many services and servers as you like. Keep in \nmind that you'll already need an account at those hosting providers before you \ncan deploy your app to them!
\n
If you're comfortable with the command line, you can also deploy to several more\nenvironments, such as:
Before you attempt to deploy your application, make sure that you have \ncommitted all your changes to version control. Cloud9 deploys for you whatever \nwas last committed to version control.
This section will show you how to deploy your applications to Heroku, a cloud-based application platform. The integration with Cloud9 IDE makes your development process even more agile. If you don't have a Heroku account, visit their website to create one for free.
\n
To get started, create a simple Node.js application. If you don't have one yet, you can follow our tutorial on developing one.
\n
After you click on the Deploy button in the Project Bar, click the plus sign next to Deploy to add another deploy target. Choose Heroku as an option. After you have signed into your Heroku account, you can create a new deploy target or choose an existing one from your account:
\n
\n
Note:
Heroku only allows you to create names for your apps that contain letters and dashes.\n\n
\n
Next, press Deploy to continue the process; the following window might appear:
\n
\n
Heroku Node.js apps are required to have a package.json file, much like with NPM. Cloud9 can generate a package.json file for you, containing metadata to share Heroku. The following lines represent what that file might looks like:
After you have a package.json file, you might see this dialog:
\n
\n
Sometimes, a Heroku app also requires a Procfile. The Procfile is needed to start the application in Heroku. You can just create a new file, add the line below, and save it as 'Procfile'. Don't add any file extensions.
\n
web: node web.js
\n
Try the deploy button again. The console will directly output the following when the deployment is completed:
\n
\n
And just like that, you've deployed your project to Heroku.
This article will show you how to deploy your applications to Windows Azure. If you don't have an account yet, the Windows Azure process will help you create one. Keep in mind that Windows Azure is not free, though it does come with a free trial. Windows Azure projects can be deployed from any operating system.
\n
To get started, create a simple Node.js application. If you don't have one yet, you can follow our tutorial on developing one.
\n
After you click on the Deploy button in the Project Bar, click the plus sign next to Deploy to add another deploy target. Choose Windows Azure as an option. You'll be prompted with this dialog:
\n
You must click on the Download Windows Azure Settings button before you can continue. If you don't have a Windows Azure account, here is where you can create one. If you do have an account, your browser will automatically download the required file.
\n
When that's finished, simply select the downloaded file from your computer, and upload it to Cloud9. You'll only have to do this process once. If you ever need to upload a new certificate, be sure to click Clear cert in the lower-right corner of this dialog.
\n
After the file has uploaded, click on Create new to create a new hosted service. A hosted service is the container in which your application is hosted when it is deployed to Windows Azure. For more information, see Overview of Creating a Hosted Service for Windows Azure.
\n
You can set a few configuration options such as the number of instances to use, its host OS, and where the data center is located. Selecting "Enable RDP" and providing a username and password enables remote desktop for your deployment.
\n
Your new Windows Azure server will appear in the Deploy list:
\n
Go ahead and click on DEPLOY. If this is the first time you're trying to deploy this project to Windows Azure, you'll receive three prompts:
\n\n
A dialog will inform you of a missing web.config file. If you click Yes, Cloud9 will create a file called Web.cloud.config in your project. This file contains configuration information about your app.
\n
\n
You'll be told about a missing csdef file. If you click Yes, Cloud9 will create a file called ServiceDefinition.csdef in your project. ServiceDefinition.csdef is a Windows Azure-specific files necessary for publishing your application For more information, see Overview of Creating a Hosted Service for Windows Azure.
\n
\n
You'll be asked to select the instance size for this application. For this tutorial, just select Small, and then click Create. For more details about Windows Azure VM sizes, see How to Configure Virtual Machine Sizes.
\n
\n\n
Your app will now deploy to a Windows Azure server! You can follow its progress in the Deploy panel, or by watching the messages in the console:\n
In the new version of Cloud9 we don't have support for deployment from the UI yet, but we're going to add those features soon.
\n
Until then, you can manually install various command-line tools into your workspace and deploy using the command line. \nIt should go without saying that this is for super 31337 developers that aren't afraid of the command line.
\n
Below is a list of some of the services we have tested and support deploying to. \nAll the commands need to be executed in the terminal unless stated otherwise.
\n
Heroku
\n
Heroku's toolbelt is installed by default in new VMs.
\n
Now, you can use the heroku command for your projects, as described in the \nHeroku documentation.
\n
If deploying to Heroku, you should probably be using a local instance of PostgresQL, or you may run into problems caused by different database interpretations of SQL.
To deploy to Azure sites from the command line, open the Terminal and type:
\n
cd ~/lib/azure-sites\nnpm install
\n
Then, add the bin to your workspace's path:
\n
PATH=$PATH:$HOME/lib/azure-sites/bin
\n
Now, you can use the azure command in the terminal.
\n
Windows Azure Cloud Services
\n
For free and premium plans, follow the instructions on the \nazure-cmdlet-node repository. This \nproject is maintained by Cloud9.
\n
Google App Engine
\n
First, setup Push to Deploy: Create a new App Engine application at \ncloud.google.com/console, and then enable \nPush-to-Deploy under 'App Engine' in the Application Settings page. Leave this \ntab open to note the URL for your repo.
\n
Secondly, configure Cloud9. Run the following commands (making sure to replace \nyour email address, auth-token, and repo-url):
The email in this case is the mail address you use to login to your Google\nApp Engine account and the password is the auth-token generated from the admin\nconsole, it is not your google password, never type that into a third party tool.\n'REPO' is the repository URL generated before.\n\n
\n
Finally, do a commit, and a push:
\n
git commit -a -m \"First commit\"\ngit push appengine master
\n
OpenShift
\n
# Install rhc:\ngem install rhc\nrhc setup\n\n# After this you can use rhc to manage your account:\n\n# list apps:\nrhc apps\n# To show what you can do with apps do:\nrhc app help\n# You deploy via a git push\ngit push <giturl> master
\n
CloudFoundry
\n
To deploy to CloudFoundry from the command line in the Console \nor a Terminal, type:
\n
cd ~\nwget https://github.com/cloudfoundry/vmc/zipball/master\nmv master cloudfoundry\nunzip cloudfoundry\ncd cloudfoundry-vmc-nnnn\nbundle
Yes, Cloud9 supports FTP workspaces that allow you to edit your files directly on your FTP server. \nCurrently FTP workspaces still open in the old version of Cloud9, but soon we'll also support FTP workspaces with the new version of Cloud9.
\n
One thing that was removed for reliability reasons in the new version of Cloud9, is the ability to deploy over FTP from a regular workspace.\nWe're bringing back those features in a new format and with much higher reliability in the coming months.
No, this is not supported by our hosting platform. It does currently allow access to the GMail servers though, so you can use that service during development.
\n
My workspace says it's out of quota. how do I fix it?
\n
You can inspect your current quota usage with the df command in the Terminal:
\n
$ df
\n
To find which files and directories are consuming a lot of space, go to a directory such as your home directory, and run this command:
\n
$du-m-d1-a|sort-n
\n
This should give you a list of all members of that directory and how much space they use in megabytes.
\n
Alternatively, try du-c9 for seeing all files you added to your workspace and account for the quota.
\n
Can I use two-factor authentication with Cloud9?
\n
You can sign into Cloud9 with your github or bitbucket account and set that up to use two-factor authentication.\nWe don't currently provide an option to directly setup your Cloud9 account for two-factor authentication.
\n
I can't preview my running app.
\n
Try using port 8080 instead, which often solves this case.
\n
EADDRINUSE: My app complains that the address/port is in use
\n
Applications won't start if another application is already listening to the same port. In order to fix it you first need to find out which process that is:
\n
$ netstat -nlp | grep $PORT
\n
This will report the process id (PID) which you can then kill using
\n
$ sudo kill -9 <PID>
\n
Often apache is still running in the background. In that case you can kill it using
\n
$ sudo pkill apache2
\n
How can I upload local files to my project?
\n
Either drag a local file directly from your desktop into the Cloud9 file tree,\nor use the "File > Upload Local Files" menu item.
\n
How can I download my project files?
\n
Use "File > Download project". Currently, this will give you a .tar.gz file, which\nensures maximum portability. To open these files, you can use something like\nWinRAR or 7-zip.
\n
How can I share a single directory of a private workspace
\n
Sometime you might want others to open a file or directory in the browser \nwithout opening up the whole workspace. This can be done by starting a small \nhttp server in that directory and make sure that the running application is public.
\n
To make the running application public you have to click the "sharing" button at\nthe top right and the check "public" for application.
\n
To run the server open a terminal and do
\n
$ cd /dir/i/want/to/share\n$ python3 -m http.server 8080
I cannot create a SSH workspace using a Digital Ocean droplet
\n
We recently discovered our web host is blocking connections to some Digital Ocean IP addresses because they suspect they are being used by Iranian users. They are legally forced to block them.
\n
Digital Ocean maintains a whitelist of droplet IP addresses which should not be blocked and our web host follows this list.
\n
Please raise a support ticket with Digital Ocean mentioning that you would like to have your droplet IP added to the whitelist. After this is complete you will be able to create your SSH workspace within 24 - 48 hours.
\n
I'm getting an error on the SSH install script: "ncurses not found"
The color picker is an awesome feature in Cloud9 IDE, designed to not only make color selections easier, but also, more harmonious. At its core, the color picker is a way to represent words (red, blue, e.t.c.), RGBA values (rgba(175, 3, 124, .6)), or hex values (#f00f00) into actual colors.
\n
To enable the color picker, flip the preferences on in the Settings panel. You can use the color picker in CSS, SVG, HTML, or APF Skin files. All you have to do is hover over the value of a color definition, and it'll instantly highlight, like this:
\n
When the represented color is highlighted, click on it. You'll get a color square defining all the possible color arrangements. To select a color, you can click in the square, pick your own RGB or HSB values, or enter some hex code. Best of all, at the bottom of the window, you'll find a list of other colors found within the same document--just in case you want to achieve matching shades:
\n
To set the value, just click anywhere outside of the color picker.
For JavaScript files, Cloud9 provides analysis using a combination of our own analysis tools, as well as JSHint (specifically for Javascript code). Our language analysis can't detect if your program is correct, fast, or has memory leaks, but it can save you time by spotting things like undeclared variables, syntax errors, or other preventable typos.
\n
When Cloud9 detects an issue with your code, an icon appears in the gutter for the offending lines of code. There are three types of identifiers available for your code:
\n
\n
Informational (): these are non-critical, non-dangerous updates about your code
\n
Warnings (): these are potentially incorrect pieces of code
\n
Errors (): these are incorrect lines of code that will almost certainly throw a runtime error when you try to run your script
\n
\n
If you hover over any of these icons in the gutter, you'll get a pop-up that presents some information as to what, exactly, the problem is. For example, suppose we have a variable declared, called fs, that is never used:
\n
Notice also that fs has a strikethrough, to provide further visual clues that something is not quite right.
\n
If you're concerned with the level of information that's listed in the gutter, you can always configure its "strictness" in the IDE preferences. For example, you could choose to hide every icon that isn't a warning or an error.
\n
Configuring Global Options
\n
JSHint provides additional configuration options that Cloud9 incorporates on a per-file basis. Typically, you declare these options as comments at the very top of a file, like this:
\n
/*jshint curly:true, debug:true */
\n
For a full list of the JSHint configutation options, please check the documentation page describing them.
For Javascript programs, Cloud9 IDE provides intelligent and responsive autocompletion for your code. Autocompletion is based not only on the content within your files, but also on the ECMAScript and Node.js standard library:
\n
\n
Methods defined in ECMAScript and Node.js also have documentation provided for you. Simply hover over a method name for a moment, and a second box quickly shows some additional information.
\n
You can disable autocompletion in the Settings menu.
Luckily you're not limited to the default set of Runners in Cloud9.\nYou can simply define your own custom Runner, which is both simple and very powerful.\nAll you need to do is create a Runner file.\nIn this article we'll describe how to do this in just a few steps.
\n
In the Run panel (usually at the bottom of the UI), click the 'Runner' text input and choose 'New Runner'. \nIn the new Runner file that's now opened, you can configure your runner\nusing a simple JSON format. We'll show a basic example below\nand then explain the different properties you can use.
\n
Let's start with a basic example: a runner for go files.
This runner will use "go run" for any file that has a ".go" file extension.\nIf you add it, it'll override our default Go runner.
\n
As another example, let's save a new Node 0.11 configuration, including Harmony support. \nCreate a new Runner, add this code, and save it as 'Node 0.11.x.run':
\n
// This file overrides the built-in Node 0.11.x runner\n// For more information see http://docs.c9.io:8080/#!/api/run-method-run\n{\n \"cmd\": [\n \"bash\",\n \"--login\",\n \"-c\",\n \"nvm use 0.11 > /dev/null; node --harmony ${debug?--nocrankshaft --nolazy --debug-brk=15454} '$file' $args\"\n ],\n \"debugger\": \"v8\",\n \"debugport\": 15454,\n \"info\": \"Your code is running at \\\\033[01;34m$url\\\\033[00m.\\n\\\\033[01;31mImportant:\\\\033[00m use \\\\033[01;32mprocess.env.PORT\\\\033[00m as the port and \\\\033[01;32mprocess.env.IP\\\\033[00m as the host in your scripts!\\n\"\n}
\n
Note:
alternatively, you can check 'Show Hidden Files' in your workspace directory tree (the small gear in the upper right corner), and create a new file in the '.c9/runners' folder called 'Node 0.11.x.run' with this code.\n\n
\n
That's it! Your custom Runner should be available in the Run panel.
\n
Runner Variables
\n
Here's a list of all the variables you can use in your runners:
\n
\n
$file_path The directory of the current file, e. g., /home/ubuntu/workspace/docs
\n
\n
$file The full path to the current file, e. g., /home/ubuntu/workspace/docs/Chapter1.txt.
\n
\n
$args Any arguments entered after the file name.
\n
\n
$file_name The name portion of the current file, e. g., Chapter1.txt.
\n
\n
$file_extension The extension portion of the current file, e. g., txt.
\n
\n
$file_base_name The name only portion of the current file, e. g., Document.
\n
\n
$packages The full path to the Packages folder.
\n
\n
$project The full path to the current project file.
\n
\n
$project_path The directory of the current project file.
\n
\n
$project_name The name portion of the current project file.
\n
\n
$project_extension The extension portion of the current project file.
\n
\n
$project_base_name The name only portion of the current project file.
\n
\n
$hostname The hostname of the workspace.
\n
\n
$hostname_path The hostname of the workspace together with the relative path of the project file.
\n
\n
$url The full url to access the workspace.
\n
\n
$port The port assigned to the workspace.
\n
\n
$ip The ip address to run a process against in the workspace.
this article is outdated, a new version will follow soon\n\n
\n
\n\n
\n\n
Let's say you're working a large project containing many files, and you kind-of sort-of know the name of a file that you want to open up. Goto File is our feature to help you quickly and easily jump to any file in your workspace, without the need to search through different directories. Simply hit Cmd-E (or Ctrl-E on Unix/Windows) and away you go:
\n
\n
Goto File offers filtering for any portion of a filename, including directories. Search for the beginning, middle, or end of a file path, or even just an extension, like .js, and Goto File with instantly present the results to you. Clicking on a name in the list opens the file right up. Goto File does not support case-insensitive, wildcard (*, ?), or regular expression (., +) searching.
\n
Goto Definition takes the same concept and applies it to files. You can easily navigate between classes and members defined in your files. By entering text, you can filter your class' member results. Finally, as you navigate through your file, Cloud9 IDE will jump to the relevant portion of the code:
\n
\n
Note:
Currently, Goto Definition only works for Javascript files.\n\n
\n
Another feature that's available is the capability to "jump to definition." If your cursor is on a variable or function name, you can tap F12 (or type jumptodef in the console) to instantly scroll the editor to the member's definition.
this article is outdated, a new version will follow soon\n\n
\n
Collaboration with Cloud9 IDE is an amazing feature that lets you do more than just share your projects with any other Cloud9 developer. You can grant someone else access to change files in your workspace, in realtime--or just let them view the workspace without any other rights. While you're collaborating, you can discuss the code through a built-in chat room.
\n
To invite someone to collaborate on a project with you, simply copy the URL in the browser and send it to a friend. You can also click on Share in the menu bar to get quick access to other ways to share, such as via e-mail, Twitter, or Facebook.
\n
Let's take a look at some of the additional features available while you collaborate.
\n
Members List
\n
There are two terms used for people accessing your project: members and visitors. Members are individuals that have read and write access to your project--that means they can change any code; visitors only have read access. The Members panel lists all the collaborators in a project, both active and inactive:
\n
\n
If you are the owner of a project, you can click on anyone's username to grant (or revoke) write access:
\n
\n
If you're worried about the sanctity of your code after grant access to other developers, fear not. You can always take a look at a file revision history to view line-by-line changes made to your project over time.
\n
Chatting
\n
Any member or visitor can participate in group chat with each other. Developers can also choose to double-click on a person's username and engage in a private, instant-message-style conversation.
\n
Collaborate on Code
\n
When a collaborator changes a file you're also working on, Cloud9 detects it and asks you whether you'd like to use their changes, or your version. We're also simply giving you the option to merge both, using a three-way-merge algorithm to handle any conflicts. This is the same algorithm used by version control systems like git for merging branches.
\n
To make the experience even smoother you can choose "Always merge by default" and we'll never interrupt you about file changes again.
Aside from Goto File and Goto Definition, Cloud9 also offers more traditional search functionality. There are three types of search modes available: quicksearch, search and replace, and find in files.
\n
Quicksearch
\n
Quicksearch can be activated by hitting Cmd-F on a Mac, or Ctrl-F on a Unix/Windows machine. As you type in the quicksearch bar, the IDE instantly shifts to the next available result. This is a great way to quickly search around in your code without hassle.
\n
Quicksearch offers the following options:
\n
\n
Regular Expressions: when enabled, your search is treated as a regular expression
\n
Match Case: when enabled, your search takes capitalizations seriously:
\n
Whole Words: when enabled, your search will only be considered for whole words:
\n
Search Backwards: when enabled, the search goes backwards, instead of forwards
\n
Wrap Around: when enabled, the search loops around the file, from bottom to top
\n
Search Selection: when enabled, the search only considers code that you've currently highlighted
\n
\n
Search and Replace
\n
Building on the features of quicksearch, search and replace allows you to replace segments of code in your file. You can again continue to use regular expressions, keeping in mind the groupings are prefixed with a dollar sign, i.e.$1.
\n
Replacing offers two more options:
\n
\n
Preserve Case: if enabled, case is preserved while replacing content
\n
Highlight Matches: if enabled, the new replaced matches are highlighted in the document
\n
\n
Find in Files
\n
In order to search across a set of files, you'll want to use the Find in Files feature. Here, you can search of a string or regular expression, within your entire workspace or a single directory. You can also filter based on extensions, like *.js or *.rb.
\n
Find in files offers some of the same search options as quicksearch:
\n
\n
Regular Expressions: when enabled, your search is treated as a regular expression
\n
Match Case: when enabled, your search takes capitalizations seriously
\n
Whole Words: when enabled, your search will only be considered for whole words
\n
\n
One more feature of find in files is the ability to render search results either in the console or the IDE. You can fold results to keep them out of the way, or, edited the file if you're working down a list:
Multiple cursors is one of the most useful features available in the Cloud9 editor. You can use multiple cursors to perform tasks like rename several variables or members at once, break up lists separated by commas, or insert the same text in multiple locations.
\n
\n
Multiple selections can be copied and pasted, and you can insert or remove entire lines in several locations.
\n
There are several ways to get access to mutliple cursors:
\n
\n
Via keyboard shortcuts, you can create a new cursor in any direction
\n
By holding the Alt key, clicking the mouse, and dragging the cursor up or down in the editor
\n
Through the menu bar at Selection>Multiple Selections
\n
\n
One of the best capabilities is the ability to instantly select the next instance of your currently highlighted section. This is especially useful for refactoring several parts of the code at once. To do this, press Ctrl-Alt, followed by the right (or left) arrow key to navigate around in the code.
Cloud9 IDE has varying levels of support for different programming languages. \nUsually you will at least have Syntax Highlighting in the editor and the ability\nto run apps from the Terminal.
\n
Syntax Highlighting
\n
Cloud9 IDE develops and builds on Ace, an \neditor for writing code online. Cloud9's Ace editor currently supports \nhighlighting for about 100 programming languages, and any changes made to Ace are \nreflected back into Cloud9 IDE.
\n
The list of supported languages is growing, and you can get the full list from \nthe View>Syntax menu. Feel free to create an issue in the Ace repository \nfor new requests, or add your own syntax highlighting mode.
The Run panel currently supports running the following by default:
\n
\n
Apache httpd (PHP, HTML)
\n
Node
\n
Python
\n
Ruby
\n
Ruby on Rails
\n
Go
\n
CoffeeScript
\n
Julia
\n
Mocha
\n
Shell script
\n
\n
If you'd like to run any other language, simply create a new "Runner".
\n
You can also do so from the Terminal. \nEach workspace is an Ubuntu VM with the standard tools like bash, make, \ngcc, vim, java SDK or perl pre-installed.
Cloud9 IDE develops and builds on Ace, an editor for writing code online. Ace supports over two dozen different themes for highlighting your code, and any changes made to Ace are reflected back into Cloud9 IDE.
\n
You can change your current theme by going to View>Themes, and selecting from one of the many options. By hovering over the menu items, you'll be able to get a preview of the theme. To activate a theme you like, just click on its name.
\n
The IDE contains the following themes:
\n
\n
Chrome
\n
Clouds
\n
Clouds Midnight
\n
Cobalt
\n
Crimson Editor
\n
Dawn
\n
Eclipse
\n
Idle Fingers
\n
Kr Theme
\n
Merbivore
\n
Merbivore Soft
\n
Mono Industrial
\n
Monokai
\n
Pastel On Dark
\n
Solarized Dark
\n
Solarized Light
\n
TextMate
\n
Tomorrow
\n
Tomorrow Night
\n
Tomorrow Night Blue
\n
Tomorrow Night Bright
\n
Tomorrow Night Eighties
\n
Twilight
\n
Vibrant Ink
\n
\n
By default, files are highlighted based on their file extension. You can change this by going to View>Syntax, and selecting a different context. This forces a single file to use a different highlighter.
\n
We support highlighting for at least the following languages, and many more:
\n
\n
CoffeeScript
\n
ColdFusion
\n
C#
\n
CSS
\n
Go
\n
Groovy
\n
haXe
\n
HTML
\n
C/C++
\n
Clojure
\n
Java
\n
JavaScript
\n
JSON
\n
LaTeX
\n
LESS
\n
Liquid
\n
Lua
\n
Markdown
\n
OCaml
\n
Perl
\n
pgSQL
\n
PHP
\n
Powershell
\n
Python
\n
Ruby
\n
OpenSCAD
\n
Scala
\n
SCSS
\n
SH
\n
SQL
\n
SVG
\n
Text
\n
Textile
\n
XML
\n
XQuery
\n
YAML
\n
\n
We are always adding new themes and new languages to support, so check the menu often! Since we use Ace to provide syntax highlighting, feel free to log an issue there for new requests.
Cloud9 IDE allows you to easily add files to your curent workspace at any time. You can drag and drop files from your computer directly into the Project Files pane, and the IDE will add them to your project. Google Chrome users can also drag entire folders into the IDE.
\n
If a file transfer is halted for some reason--say, if you lose your internet connection--the upload resumes once the connection returns. As the files transfer, the IDE lets you know the current status of the overall transfer, as well as the status of each file being uploaded:
\n
\n
You can also get an exact copy of your workspace to save on your computer. By going into File>Download Project, you will be provided with a Zip file containing the entirety of your project.
For Drupal there are some installation guides around which tell you to install PHP first, but that's not necessary with Cloud9.\nYou don't need to install MySQL either, it is already preinstalled in PHP workspaces. \nJust make a new workspace, choose PHP, go to the Terminal, and execute the following:
\n
cd $HOME\ncurl -O http://ftp.drupal.org/files/projects/drupal-7.30.tar.gz\ntar xvf drupal-7.30.tar.gz\nmv drupal-7.30/* workspace/\nmv drupal-7.30/.htaccess workspace/\ncd $HOME/workspace\nmysql-ctl install\nmysql-ctl start\nmysql-ctl status
\n
Open the file install.php in the file tree, and while opened, click on the "Run Project" button in the menu bar on top of the IDE.\nAn URL will be shown at the bottom of the page, something like "https://drupal-c9-lcipriani.c9.io/", but with your username and workspace name in it.
\n
Copy the url in a new browser tab and you will see the install page of Drupal
\n
You can now proceed with the installer
\n
\n
Now be careful inserting the correct values for the database. You need to change the values as follows:
\n
user: yourusername\ndatabase: c9\nhost: 127.0.0.1
\n
Note:
localhost will not work, while 127.0.0.1 will.\n\n
\n
Open the Advanced Options in the database settings page as shown in the screenshot:
\n
\n
Now fill the form with the correct site information:
\n
\n
Continue the setup and enjoy your website!
\n
Note:
if you are not able to load CSS, access your website WITHOUT using https, but use simple http; in another tab open the url: http://drupal-c9-lcipriani.c9.io/\n\n
When you're working with git repositories, it's helpful to know who made a commit to a particular piece of code. As it turns out, git has a feature called git blame that we've integrated directly into Cloud9 IDE.
\n
By using git blame, you'll be able to instantly discover who edited certain lines of code, when they edited it, and what their commit message at the time was. Clicking on a git commit also highlights other lines of code changed at the same time. To launch the git blame feature, open a file and navigate to Tools>Git>Blame.
Zen mode is a full screen coding environment designed to make you more productive. It essentially removes all the additional UI elements in Cloud9 IDE, and places you in a harmonious relationship with your code.
\n
To activate zen mode, simply hover over the upper right corner of the code editor, and click the icon that appears. Keep in mind that you'll need to have a file open before you can launch zen mode. You can resize your window by holding and dragging the left or right border.
\n
To get out of zen mode, hover over the same corner and click the same icon.
\n
You can also enter and exit zen mode via keyboard shortcuts, command line, or from the menu bar at View>Zen Mode.
Run Ghost by typing npm start in the console or by opening index.js and\nhitting the run button.
\n
\n
Click the "Preview" button in the top menu in the IDE, and choose \n"Preview with Web Server". This will open the Preview window for your newly setup Ghost blog
\n\n
Change the URL to /ghost and create your admin user to login to the Ghost admin interface
Joomla is a popular open source CMS. \nInstalling Joomla is very straightforward, but there are just a few quirks to keep in mind, which we describe below.
\n
Note:
all instructions here are based on Joomla v3.x.\n\n
Joomla requires a MySQL database to connect to. MySQL is pre-installed in your workspace, so just execute these commands:
\n
mysql-ctl install\nmysql-ctl start
\n
... and then note the credentials to use in the configuration of Joomla later on.
\n
Install Joomla
\n
To run the Joomla installer, open index.php and run it with the "Run" (or "Run Project") button at the top of the IDE.\nNext, click the URL that's displayed in the Run panel, which looks something like https://joomla-c9-username.c9.io/installation/index.php#. \nThis will open up the Preview window with the installer.
\n
Now, here comes the quirky part: the installer will not work properly if it's loaded over HTTPS, as the Cloud9 Preview window does by default.\nSo, in order to make the Joomla installer work, do the following:
\n\n
Pop out the Preview by clicking the Popout icon (or copy & load the URL in a browser tab)
\n
Change the URL from https:// to http:// and load it
\n\n
Now you should be able you to get through the installer successfully.
\n
Main configuration
\n
The main Configuration screen should look like this:
\n
\n
Enter whatever values you'd like here.
\n
Database
\n
The second quirky and important thing to keep in mind in the Database section, is to use Host Name "0.0.0.0" instead of "localhost".
\n
So use values like shown in the screenshot below:
\n
\n
Finally
\n
Use whatever settings you'd like in the final installation screen, and after it completes, have Joomla remove the Installation folder for safety.
\n
That's it, you're done and your Joomla setup should run fully on Cloud9!
this article is outdated, a new version will follow soon\n\n
\n
\n\n
\n\n
Every time you save a file on Cloud9, a diff of any changes made to it is saved by the server. Over time, you can view these file revisions as content is added and removed from your files. You can also restore a file to any previously saved state; you'll never have to worry about losing your work ever again!
\n
To access file revisions, you can either go to File>File Revisions History, or type Cmd-B on Mac or Ctrl-B on Linux/Windows. This will pop open the Revisions History panel. Red lines indicate lines that were removed; green lines indicate lines that were either added or changed.
\n
At the bottom of the panel, there's a checkbox for showing all of a file's changes. Files changes that occur relatively soon to one another--say, a few seconds--are grouped by the revisions panel as one "change." If you prefer to see every single change as an individual entry, enable the Show all file changes checkbox.
\n
To restore a file to a previous revision, simply click the revisions button for that entry:
Koa is a new web framework designed by the team behind Express, which aims to be a smaller, more expressive, and more robust foundation for web applications and APIs.
\n
To get started with a Koa app, first create a workspace and choose either the Node.js type, or a Custom workspace type for a clean workspace.
\n
Koa.Js makes use of the new generator feature in javascript ECMA 6. \nThis feature is support in Node from 0.11 and up by toggling the --harmony flag. \nBy default Cloud9 runs Node v0.10.x or v0.8.x, depending on your setup, so we first need activate Node version 0.11.x.
\n
Open a Terminal, or using the pre-existing one at the bottom and execute the following in your Terminal:
\n
nvm use 0.11
\n
Next, we need to install Koa itself:
\n
npm install koa
\n
Now we can create a simple Koa.Js server.\nCreate a server.js file in your root folder with this code:
\n
var koa = require('koa');\nvar app = koa();\n\napp.use(function *(){\n this.body = '<h1>Hello from Koa.Js</h1>';\n});\n\napp.listen(process.env.PORT);
\n
If you now press the Run button on top of the IDE, you will see some errors, as the runner/debugger defaults to 'Node (default)', which is Node version 0.10.x or 0.8.x.
\n
Luckily all you need is to create a Runner file so Cloud9 can run Node 11.x in harmony mode and thereby support generators.
\n
In the Run panel below, click the 'Runner' text input and choose 'New Runner'. \nIn the new Runner file that's opened, save the following code as 'Node 0.11.x.run':
\n
// This file overrides the built-in Node 0.11.x runner\n// For more information see http://docs.c9.io:8080/#!/api/run-method-run\n{\n \"cmd\": [\n \"bash\",\n \"--login\",\n \"-c\",\n \"nvm use 0.11 > /dev/null; node --harmony ${debug?--nocrankshaft --nolazy --debug-brk=15454} '$file' $args\"\n ],\n \"debugger\": \"v8\",\n \"debugport\": 15454,\n \"info\": \"Your code is running at \\\\033[01;34m$url\\\\033[00m.\\n\\\\033[01;31mImportant:\\\\033[00m use \\\\033[01;32mprocess.env.PORT\\\\033[00m as the port and \\\\033[01;32mprocess.env.IP\\\\033[00m as the host in your scripts!\\n\"\n}
\n
Note:
alternatively, you can check 'Show Hidden Files' in your workspace directory tree (the small gear in the upper right corner), and create a new file in the '.c9/runners' folder called 'Node 0.11.x.run' with this code.\n\n
\n
Let's run server.js with this new configuration; in the Run panel on the bottom, choose your new 'Node 0.11.x' Runner, and press Run again.
\n
You Koa.Js server should now be up and running.
\n
Now if you click the Preview button in the top menu in the IDE, and choose "Preview with Web Server", this will open the Preview window for your running app.
Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.
\n
To get started with an Express app, first create a workspace and choose either the Node.js type, or a Custom workspace type for a clean workspace. Open the new workspace (or an existing one) to follow the instructions below.
\n
Installation
\n
First we'll install the Express project generator and generate an application stub:
You might want to take a look at package.json and update the application name from the default workspace to something more fitting.
\n
Running
\n
Now you have a fully configured express application already. You can run it from the terminal using:
\n
$ bin/www
\n
Now if you click the Preview button in the top menu in the IDE, and choose "Preview with Web Server", this will open the Preview window for your running app.
\n
Creating a Run Configuration
\n
In order to make life easier you can create a run configuration for express.
\n\n
Click Run -> Run Configurations -> Manage ...
\n
Click Add New Config
\n
In the run panel fill in Express as name, bin/www as the command and Node 0.10.x as the runner.
\n
You can optionally make this run configuration the default runner by clicking Set As Default. If you do so then clicking the run button will always run the app and not the currently opened file.
\n\n
The finished run configuration should look something like this
For Laravel there are some installation guides around which tell you to install PHP first, but that's not necessary with Cloud9.\nJust make a new workspace, choose PHP, go to the Terminal, and execute the following:
As lavarel is serving its content from the public directory we need to modify the apache config:
\n
sudo vi /etc/apache2/sites-enabled/001-cloud9.conf
\n
Then do the following:
\n
// Change this line\nDocumentRoot /home/ubuntu/workspace\n\n// To following\nDocumentRoot /home/ubuntu/workspace/public
\n
Run the project with the "Run Project" button in the menu bar on top of the IDE.\nIf you click the URL that appears in the Run panel below (in the shape of 'https://laravel-c9-username.c9.io/'), you can preview your new Laravel app.
Open your Terminal and execute the following to create a new Symfony-Project\nYou need the first line only if you used the PHP Project type for your workspace.
The create-project composer command will ask for a few parameters, the only one you need to pay special attention is the database-host parameter.
\n
Running the project
\n
There is a IP address checking in the web/app_dev.php file. To disable this check please remove the following lines
\n
// This check prevents access to debug front controllers that are deployed by accident to production servers.\n // Feel free to remove this, extend it, or make something more sophisticated.\n if (isset($_SERVER['HTTP_CLIENT_IP'])\n || isset($_SERVER['HTTP_X_FORWARDED_FOR'])\n || !in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1'))\n ) {\n header('HTTP/1.0403 Forbidden');\n exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');\n }
\n
After that add a new run configuration in Menu Run > Run Configurations > New Run Configuration. Select Apache http (PHP, HTML) as a Runner and web/app_dev.php as Command.\nThat's it after you hit Run your server will start up and you can access your new Symfony project.
On Hosted and SSH workspaces, Cloud9 provides two ways to run your application:
\n\n
Using the Run panel with built-in Runners for many languages
\n
From a Terminal
\n\n
Method 1: Use the Run panel
\n
First, open the file you want to run.
\n
Next, click on the Run button in the top menu bar in the IDE.
\n
\n
The Run button acts as a sort of shortcut to the Run panel, which will appear by default in the bottom of the IDE when you run a file.\nThis automatically runs the currently active file, and it will guess which Runner to use based on the extension of the file.
\n
When you're ready to stop your app, click on the Stop Button button in the menu bar at any time, or from the Run panel below.
\n
\n
On the Run panel, you'll notice a few more options you can set. \nFilling these textboxes out creates a Run Configuration.
\n
\n
Name: the name of your run scenario
\n
Command: the command you want to run; this is usually the location of your running file in your project, but it also allows you to provide any additional command line arguments you want to pass to your app
\n
Runner: defines how you want your code to be run. A wide range of Runners is available by default, from Apache to Node.js and Shell scripts, and you can define your own.
\n
CWD: Set the current working directory to start from
For some default runners like Node.js, it's an option to Run in debug mode, which indicates that you want to run the current code through the debugger. \nThis will reveal (or collapse) the debugging tools panel described in Running and Debugging your code.
\n
Method 2: From the Terminal
\n
The built-in Terminal provides access to all underlying system commands, including your Runners such as Node.js. \nSimply open up a Terminal from the "+" sign, or use CMD+T (Mac) / Control+T (Windows), and then execute the command you need to run your app, e.g. node server.js.
\n
(Pre-)View your application
\n
To find out where your application is running you can do two things:
\n\n
Use the Preview button on the top to preview one of your files. The URL in the browser bar in the Preview can also be used in any browser tab/window.
\n
Use the Share button on the top to figure out the URLs of running Application and the Preview. The Editor URL is only used to share your entire Cloud9 workspace to collaborate on code.
\n\n
Tip:
If you can't find how to preview your running app, try to use port 8080 in the URL.
\n\n
"
- },
- {
- "filename": "setup_a_database",
- "mtime": 1412172002000,
- "pageTitle": "Set up a database",
- "contents": "
Set up a database
\n
MySQL
\n
From the Terminal, run the following command:
\n
$ mysql-ctl install
\n
The output will be:
\n
MySQL 5.5 database added. Please make noteof these credentials:\n\nRoot User: username\nDatabase Name: c9
\n
Now you can connect to the database using the ip 127.0.0.1 and the default port 3306.\nYou can also test it using our tool from the Terminal:
After you have logged into Cloud9, you are placed into your account's dashboard. From here, you can edit your profile and manage workspaces you have access to.
\n
\n
In the top-left corner of the dashboard, your username is displayed. Within the user context, you can view your user profile by clicking on Your Account:
\n
\n
The user profile contains:
\n
\n
Your recent activities, including a list of actions you have recently performed, such as cloning, opening, and deleting projects
\n
Your add-on services, which you've integrated into Cloud9. Currently, these are GitHub and Bitbucket.
\n
Your account settings, where you're given the following choices:
\n
Change your password
\n
Show your SSH key
\n
Upgrade to premium (or, downgrade from it)
\n
Delete your account
\n
\n
\n
\n
The gravatar that is used for your profile is handled by gravatar.com. If you don't have a gravatar yet, Cloud9 IDE uses an uninspiring default.
\n
In the left panel, you'll find a list of various projects associated with your account. These are:
\n
\n
My Projects: these are projects you've created or cloned, and own
\n
Shared With Me: these are projects shared with you by other Cloud9 users
\n
Recently Visited: these are projects you've seen lately
\n
Projects on GitHub: a list of your uncloned public and private GitHub projects
\n
Projects on Bitbucket: a list of your uncloned public and private Bitbucket projects
You can always filter your project list by entering text in the text bar to find matching projects. If you need to update the list, click the refresh icon at the bottom of the panel:
"Hosted" is the best choice for most people, so in this short "Getting Started" article we'll only describe this option; for other options please read the full Creating a new workspace article.
\n
The first step for creating a new workspace is click the "CREATE NEW WORKSPACE" button in your Dashboard:
\n
\n
At this point, you'll encounter two choices: Create a new workspace and Clone from URL. \nIn this article we'll only describe the Create a New Workspace option, which allows you to create any of the previously mentioned types of workspaces (hosted, FTP, or SSH).
\n
After clicking on Create a new workspace, you're taken to the screen below:
\n
\n
First, let's enter a workspace name.\nDepending on whether you have a Free of Premium account, you can choose to make it either Public (open to anyone with the URL), or Private (only accessible to you and people you share it with).
\n
After this, choose the type of workspace you want to create:
\n
\n
Hosted: This is a regular Cloud9 workspace, powered by a full Ubuntu environment. You even have sudo powers!
SSH, also called the "bring your own server" feature, lets you log into a server you own and run Cloud9 from there
\n
\n
Choose the "Hosted" workspace type to start from scratch with a 'Custom' workspace, or simply pick a pre-configured environment like Node.js, WordPress, or Python/Django, and immediately start developing your app.\nThis way you don't need to spend valuable development time on system setup and maintenance, as we maintain it, and you control it.
\n
\n
As it's powered by a full Linux Ubuntu environment, hosted workspaces allow you to install any package (sudo apt-get install package), run git commands from the console to push your changes to a GitHub repo or a Bitbucket git repo, etcetera.
\n
Now press Create. That's it! You can now see your new workspace in the dashboard:
this article is outdated, a new version will follow soon\n\n
\n
Cloud9 IDE can be thought of as being divided into the following components:
\n
\n
Throughout the documentation, we'll refer to these sections by name. We can identify several distinct areas in the editor:
\n
\n
The top menu bar is the uppermost area, with easy access to a variety of menus
\n
The project bar on the left lets you manipulate various aspects of your project, including its active files, preferences, and choices for deployment
\n
The panel displays views according to what's been selected in the project bar
\n
The toolbar is on the far right, where you can find tools used when debugging your code. Projects that are open with collaboration also make use of this panel for chatting.
\n
The code editor is the main area where you write your code.
\n
The console is the bottom area of the window. It's an expandable area that can act like a desktop terminal to enter command line input (like ls or mkdir). It also displays output provided by your program's print statements (like console.log()), as well as providing an area for search results
\n
\n
The Project Bar, Tool Bar, and Console are powerful features, so their documentation is provided separately. We'll talk about the rest of the editor below:
\n
Remember: nearly every UI element can be collapsed, in order to provided a more harmonious coding experience. For example, clicking on the buttons in the upper left of the editor allows you to hide the panels and top menu bar:
\n
The Top Menu Bar
\n
\n
In this section, you can find the usual menus for creating and saving files, changing your view, applying a new theme for the editor, and switching between windows.
The preview button provides you with a look of what the currently active file would look like in the browser. For text files, this is usually just the raw text, but certain files, like HTML or XML, render as the actual markup.
\n
The autosave button indicates the status of your current saves: . Files are saved automatically by Cloud9 IDE, and every revision is made available for you to browse through. For more information, see the section on revisions and saving.
\n
On the far right of the menu, near the Cloud9 IDE logo, there are two more icons: one to return to the dashboard, and one to return to the Cloud9 IDE homepage.
\n
The Code Editor
\n
This is where most of the action happens. Every file you open appears here as a tab. You can open a new file easily by clicking on the button to the right of the last tab. Cloud9 IDE offers syntax highlighting for over two dozen programming languages.
\n
The code editor supports a large number of keyboard shortcuts to increase your productivity. For an up-to-date list of these within the IDE, simply go to Help>Keyboard Shortcuts.
\n
If you hover over to the upper-right corner, you can activate zen-mode, which is a full screen coding environment.
As you develop your application, often you just want to quickly demo your work-in-progress to a colleague, customer, or friend. \nOr you want to pull in a fellow dev to debug an issue, or to pair program.
\n
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. \nHere we describe how to access these options, and how to use each.
\n
Share dialog
\n
The best place to start sharing is from the dedicated "Share" dialog. \nAccess it via the "Share" button on the right top of the IDE, or via the menu in Window > Share...
\n
\n
Here's what you see when you pull up the Share dialog:
\n
\n
Links to share
\n
\n
Editor: see section "Share your development environment"
\n
Application: see section "Share your application"
\n\n
\n
If you enable the "Public" checkbox for an option, it will make the URL accessible for anyone with the URL.\nFor public workspaces all these URLs are public by default, but for private workspaces you have to enable them manually.
\n
Who has access
\n
This section refers to people you have specifically granted access to your entire development environment.\n(R) gives Read access only to that person: the ability to open and view files, and to run your code.\n(RW) or "Read/Write" also gives that person the ability to write to files.
\n
Invite people
\n
This section enables you to invite people to your workspace and immediately set if they have just "Read" or "Read+Write" rights. \nYou can invite people by their email address or Cloud9 username. \nYou can also choose whether or not send an automatic email to that person that they've been invited to your workspace.
\n
Share your development environment
\n
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.\nYou'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.\nSee the screenshot below for what this looks like:
\n
\n
In order to share your entire development environment, do one of the following:
\n\n
Make the URL publicly available to everyone: check the "Public" checkbox for the "Editor" in the "Links to Share" section.
\n
Choose to share only with specific people: invite them from the "Invite people" section.
\n
Grant/revoke access rights in the "Who has access" section.
\n\n
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.
\n
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\n\n
\n
Share your application
\n
If you Run your application the result can be shared by copying the URL from the dialog. \nThis 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
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.
\n
Note:
alternatively you can just share the URL to your running app from the Preview panels' URL bar\n\n
\n
Share a Preview
\n
If you Preview a file in your application, it can be shared by copying the URL from the dialog. \nThis 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
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.
\n
Note:
alternatively you can just share the URL to your Preview from the Preview panels' URL bar\n\n
\n
Tip:
If you can't find how to preview your running app, try to use port 8080 in the URL.
The Console is at the bottom of the IDE. It's where you can enter command line input, view output from your program, and push and pull your files between your code repositories.
\n
Note:
The Console contains a full-fledged terminal, which provides you with a TTY interface for direct access to the machine that Cloud9 is running on.\n\n
\n
Available Commands
\n
The terminal can perform all Unix commands, and allows for path autocompletion by hitting Tab.
\n
For instance, you can use mercurial commands (hg) and git commands (git) to communicate with the system, and to push your code between repositories. Typing hg or git shows the complete list of commands that are available for these services. For more information about these commands, please check their respective documentation:
To use mercurial commands on the project you are working on, you must have a mercurial project set up; the same holds true for git. Follow these links to learn more about how to set up these project in Cloud9:
The output tab in the Console shows information whenever a user is running or debugging a program. The content is similar to the output of a desktop terminal:
\n
The output tab also displays the error and additional information that can improve your coding quality. You can use the Console to output results from your running application, just like a regular terminal.
\n
As your process runs, you'll see a message similar to this one indicating that Cloud9 is running something in the background:
\n
If you hover over this message, you can opt to cancel the process by clicking on the button:
We are choosing the PHP workspace type to in order to have the Apache runner\nas a default so you can just click Run Project to get started. This doesn't\nlimit the choice of the backend technology you might want to use.
this article is outdated, a new version will follow soon\n\n
\n
Nearly every action in Cloud9 has a corresponding command associated with it. On top of that, every command also has a keybinding that can be used to effortlessly execute the command.
\n
Below is a list of every single command and keybinding used by Cloud9. Have fun being efficient!
The editor is the most important element of any IDE; that's why Cloud9 developed ACE. ACE is a high-performance code editor for the web that supports over 40 different languages, over two dozen themes, and can still work faithfully on large documents (at last count, four million lines of code was the upper limit). It also contains a bevy of features you'd expect from traditional desktop editors. Among these include:
this article is outdated, a new version will follow soon\n\n
\n
There are many different ways to configure the IDE. Below is a list of the options available, and what they do.
\n
Note:
All of these options are on a per-project basis. Changing them in one project does not affect any another.\n\n
\n
General
\n
This section controls the overall IDE behavior:
\n
\n \n
\n
Preference Name
\n
Description
\n
\n \n \n
\n
Enable UI Animations
\n
Enables or disables fluid animations for various UI elements, such as the Project Bar
\n
\n
\n
Animate Scrolling
\n
Enables or disables fluid animations when scrolling through code (such as for goto line)
\n
\n
\n
Enable Auto-Save
\n
If enabled, automatically saves your files on every change
\n
\n
\n
On Save, Strip Whitespace
\n
When saving a file, you can remove all extraneous whitespace from your code lines
\n
\n
\n
Reveal Active File in Project Tree
\n
Enabling this jumps the project tree to the active file whenever a tab changes to a different file
\n
\n
\n
Warn Before Exiting
\n
Prevents accidental data loss by showing a dialog asking if you really want to leave Cloud9 IDE when closing your browser
\n
\n
\n
Node.js Runtime
\n
Defines the default runtime for your Node.js code. "Auto" is based on whatever is in the package.json file, while "Default" reverts to Node 0.6.x.
\n
\n
\n
Keybindings
\n
Allows you to choose which operating system to use for keyboard shortcuts
\n
\n \n
\n
Language Support
\n
This section controls language analysis options:
\n
\n \n
\n
Preference Name
\n
Description
\n
\n \n \n
\n
Enable Hints and Warnings Rules
\n
Presents information about your code in the gutter
\n
\n
\n
Highlight Variable Instances
\n
Highlights variable instances in your code
\n
\n
\n
Mark Undeclared Variables
\n
Provides warnings if a variable is being used and has not been declared yet
\n
\n
Mark Unused Function Arguments
\n
Provides a strikethrough for arguments in a function that are not being used
\n
\n
\n
Warning Level
\n
Specifies the minimum level of information severity you want provided in the gutter
\n
\n \n
\n
Code Editor
\n
This section controls language analysis options:
\n
\n \n
\n
Preference Name
\n
Description
\n
\n \n \n
\n
Auto-pair Quotes, Brackets, etc.
\n
When enabled, typing ", (, or [ will actually make two characters appear. In addition, whenever you highlight a word and type one of these characters, it is surrounded by that character (e.g. words becomes "words")
\n
\n
\n
Full Line Selection
\n
When highlighting lines, this option will highlight all ending whitespace, until the end of the editor window
\n
\n
\n
Highlight Active Line
\n
Presents a darker shade in the code editor to indicate which line you're currently on
\n
\n
Highlight Gutter Line
\n
Presents a darker shade in the gutter which line you're currently on
\n
\n
\n
Show Invisible Characters
\n
Shows invisibles characters in the editor, like tabs and line breaks
\n
\n
\n
Show Indent Guides
\n
Shows the indent guides in the editor, letting you see your code's nestings
\n
\n
\n
Show Gutter
\n
Shows the gutter in the editor, which indicates line numbers, warnings, and errors
\n
\n
\n
Highlight Selected Word
\n
If you highlight a word, this highlights all matching words in the editor
\n
\n
\n
Auto-hide Horizontal Scroll
\n
When this is enabled, this will hide the horizontal scroll bar in the editor. Note that this has no effect in Mac OS X 10.7 (Lion) and above, since all scrollbars, by default, auto-hide.
\n
\n
\n
Vim Mode
\n
When enabled, allows you to use vim keybindings in the IDE
\n
\n
\n
Code Folding
\n
When enabled, allows you to show or hide "blocks" of code
\n
\n
\n
Fade Fold Widgets
\n
When enabled, fades the folding widgets in the gutter
\n
\n
\n
Font Size
\n
Changes the font size of the code in the editor
\n
\n
\n
Show Print Margin
\n
Shows (and defines) the number of characters possible in line, before it wraps
\n
\n
\n
Soft Tabs
\n
Indicates how many spaces a single tab represents
\n
\n
\n
Mouse Scroll Speed
\n
Defines the speed of the mouse scrolls
\n
\n
\n
Newline Mode
\n
Specifies the newline mode for the IDE
\n
\n \n
\n
Terminal
\n
This section controls the behavior for the terminal:
\n
\n \n
\n
Preference Name
\n
Description
\n
\n \n \n
Scrollback
\n
Sets the scrollback buffer for the terminal
\n
\n
\n
Font Family
\n
Sets the font for the terminal
\n
\n
\n
Font Size
\n
Sets the font size for the terminal
\n
\n
Blinking Cursor
\n
Specifies whether or not you want the cursor to blink
\n
\n \n
\n
Code Tools
\n
This section controls the various tools that are available in the IDE:
this article is outdated, a new version will follow soon\n\n
\n
The terminal provides you with a TTY interface for direct access to the machine that Cloud9 is running on. If you're running your own workspace, this is the server you've SSH'ed into. If you're using the hosted Cloud9 platform, this is the server your code runs on.
\n
Warning:
While certain operations, like sudo, are restricted, you can completely destroy your workspace, by doing something like rm -rf. Use your power wisely!\n\n
\n
To create a new terminal, go to View>Terminals>New Terminal, or simply type Alt-T on the keyboard. The terminal has the following capabilities:
\n
\n
Perform all Unix commands
\n
You can create more than one instance of a terminal (by just creating a new tab)
\n
The terminal allows for path autocompletion by hitting Tab
Jekyll is a great static site generator, also used by github pages. You simply need to install the Ruby gem and then make sure you pass the right port to the serve command.
\n
$ gem install jekyll\n$ jekyll new my-awesome-site\n$ cd my-awesome-site\n$ jekyll serve --port $PORT
Cloud9 IDE offers many different ways to get your code from your editor to your \\nproduction server. To deploy your code, click on the Deploy button in the \\nProject Bar:
\\n
\\n
We offer tight integration with the following environments:
Following these links will provide you with more information on code deployment.\\nYou can deploy your code to as many services and servers as you like. Keep in \\nmind that you'll already need an account at those hosting providers before you \\ncan deploy your app to them!
\\n
If you're comfortable with the command line, you can also deploy to several more\\nenvironments, such as:
Before you attempt to deploy your application, make sure that you have \\ncommitted all your changes to version control. Cloud9 deploys for you whatever \\nwas last committed to version control.
This section will show you how to deploy your applications to Heroku, a cloud-based application platform. The integration with Cloud9 IDE makes your development process even more agile. If you don't have a Heroku account, visit their website to create one for free.
\\n
To get started, create a simple Node.js application. If you don't have one yet, you can follow our tutorial on developing one.
\\n
After you click on the Deploy button in the Project Bar, click the plus sign next to Deploy to add another deploy target. Choose Heroku as an option. After you have signed into your Heroku account, you can create a new deploy target or choose an existing one from your account:
\\n
\\n
Note:
Heroku only allows you to create names for your apps that contain letters and dashes.\\n\\n
\\n
Next, press Deploy to continue the process; the following window might appear:
\\n
\\n
Heroku Node.js apps are required to have a package.json file, much like with NPM. Cloud9 can generate a package.json file for you, containing metadata to share Heroku. The following lines represent what that file might looks like:
After you have a package.json file, you might see this dialog:
\\n
\\n
Sometimes, a Heroku app also requires a Procfile. The Procfile is needed to start the application in Heroku. You can just create a new file, add the line below, and save it as 'Procfile'. Don't add any file extensions.
\\n
web: node web.js
\\n
Try the deploy button again. The console will directly output the following when the deployment is completed:
\\n
\\n
And just like that, you've deployed your project to Heroku.
\\n\\n
\\n \\n \"\n },\n {\n \"filename\": \"deploying_to_windows_azure_sites\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Deploying to Windows Azure Sites\",\n \"contents\": \"\\n
Deploying to Windows Azure Sites
\\n
This article will show you how to deploy your applications to Windows Azure. If you don't have an account yet, the Windows Azure process will help you create one. Keep in mind that Windows Azure is not free, though it does come with a free trial. Windows Azure projects can be deployed from any operating system.
\\n
To get started, create a simple Node.js application. If you don't have one yet, you can follow our tutorial on developing one.
\\n
After you click on the Deploy button in the Project Bar, click the plus sign next to Deploy to add another deploy target. Choose Windows Azure as an option. You'll be prompted with this dialog:
\\n
You must click on the Download Windows Azure Settings button before you can continue. If you don't have a Windows Azure account, here is where you can create one. If you do have an account, your browser will automatically download the required file.
\\n
When that's finished, simply select the downloaded file from your computer, and upload it to Cloud9. You'll only have to do this process once. If you ever need to upload a new certificate, be sure to click Clear cert in the lower-right corner of this dialog.
\\n
After the file has uploaded, click on Create new to create a new hosted service. A hosted service is the container in which your application is hosted when it is deployed to Windows Azure. For more information, see Overview of Creating a Hosted Service for Windows Azure.
\\n
You can set a few configuration options such as the number of instances to use, its host OS, and where the data center is located. Selecting "Enable RDP" and providing a username and password enables remote desktop for your deployment.
\\n
Your new Windows Azure server will appear in the Deploy list:
\\n
Go ahead and click on DEPLOY. If this is the first time you're trying to deploy this project to Windows Azure, you'll receive three prompts:
\\n\\n
A dialog will inform you of a missing web.config file. If you click Yes, Cloud9 will create a file called Web.cloud.config in your project. This file contains configuration information about your app.
\\n
\\n
You'll be told about a missing csdef file. If you click Yes, Cloud9 will create a file called ServiceDefinition.csdef in your project. ServiceDefinition.csdef is a Windows Azure-specific files necessary for publishing your application For more information, see Overview of Creating a Hosted Service for Windows Azure.
\\n
\\n
You'll be asked to select the instance size for this application. For this tutorial, just select Small, and then click Create. For more details about Windows Azure VM sizes, see How to Configure Virtual Machine Sizes.
\\n
\\n\\n
Your app will now deploy to a Windows Azure server! You can follow its progress in the Deploy panel, or by watching the messages in the console:\\n
\\n \\n \"\n },\n {\n \"filename\": \"deploying_via_cli\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Deploying via the Command Line\",\n \"contents\": \"\\n \\n
Deploying via the Command Line
\\n
In the new version of Cloud9 we don't have support for deployment from the UI yet, but we're going to add those features soon.
\\n
Until then, you can manually install various command-line tools into your workspace and deploy using the command line. \\nIt should go without saying that this is for super 31337 developers that aren't afraid of the command line.
\\n
Below is a list of some of the services we have tested and support deploying to. \\nAll the commands need to be executed in the terminal unless stated otherwise.
\\n
Heroku
\\n
Heroku's toolbelt is installed by default in new VMs.
\\n
Now, you can use the heroku command for your projects, as described in the \\nHeroku documentation.
\\n
If deploying to Heroku, you should probably be using a local instance of PostgresQL, or you may run into problems caused by different database interpretations of SQL.
To deploy to Azure sites from the command line, open the Terminal and type:
\\n
cd ~/lib/azure-sites\\nnpm install
\\n
Then, add the bin to your workspace's path:
\\n
PATH=$PATH:$HOME/lib/azure-sites/bin
\\n
Now, you can use the azure command in the terminal.
\\n
Windows Azure Cloud Services
\\n
For free and premium plans, follow the instructions on the \\nazure-cmdlet-node repository. This \\nproject is maintained by Cloud9.
\\n
Google App Engine
\\n
First, setup Push to Deploy: Create a new App Engine application at \\ncloud.google.com/console, and then enable \\nPush-to-Deploy under 'App Engine' in the Application Settings page. Leave this \\ntab open to note the URL for your repo.
\\n
Secondly, configure Cloud9. Run the following commands (making sure to replace \\nyour email address, auth-token, and repo-url):
The email in this case is the mail address you use to login to your Google\\nApp Engine account and the password is the auth-token generated from the admin\\nconsole, it is not your google password, never type that into a third party tool.\\n'REPO' is the repository URL generated before.\\n\\n
\\n
Finally, do a commit, and a push:
\\n
git commit -a -m \\\"First commit\\\"\\ngit push appengine master
\\n
OpenShift
\\n
# Install rhc:\\ngem install rhc\\nrhc setup\\n\\n# After this you can use rhc to manage your account:\\n\\n# list apps:\\nrhc apps\\n# To show what you can do with apps do:\\nrhc app help\\n# You deploy via a git push\\ngit push <giturl> master
\\n
CloudFoundry
\\n
To deploy to CloudFoundry from the command line in the Console \\nor a Terminal, type:
\\n
cd ~\\nwget https://github.com/cloudfoundry/vmc/zipball/master\\nmv master cloudfoundry\\nunzip cloudfoundry\\ncd cloudfoundry-vmc-nnnn\\nbundle
Yes, Cloud9 supports FTP workspaces that allow you to edit your files directly on your FTP server. \\nCurrently FTP workspaces still open in the old version of Cloud9, but soon we'll also support FTP workspaces with the new version of Cloud9.
\\n
One thing that was removed for reliability reasons in the new version of Cloud9, is the ability to deploy over FTP from a regular workspace.\\nWe're bringing back those features in a new format and with much higher reliability in the coming months.
No, this is not supported by our hosting platform. It does currently allow access to the GMail servers though, so you can use that service during development.
\\n
My workspace says it's out of quota. how do I fix it?
\\n
You can inspect your current quota usage with the df command in the Terminal:
\\n
$ df
\\n
To find which files and directories are consuming a lot of space, go to a directory such as your home directory, and run this command:
\\n
$du-m-d1-a|sort-n
\\n
This should give you a list of all members of that directory and how much space they use in megabytes.
\\n
Alternatively, try du-c9 for seeing all files you added to your workspace and account for the quota.
\\n
Can I use two-factor authentication with Cloud9?
\\n
You can sign into Cloud9 with your github or bitbucket account and set that up to use two-factor authentication.\\nWe don't currently provide an option to directly setup your Cloud9 account for two-factor authentication.
\\n
I can't preview my running app.
\\n
Try using port 8080 instead, which often solves this case.
\\n
EADDRINUSE: My app complains that the address/port is in use
\\n
Applications won't start if another application is already listening to the same port. In order to fix it you first need to find out which process that is:
\\n
$ netstat -nlp | grep $PORT
\\n
This will report the process id (PID) which you can then kill using
\\n
$ sudo kill -9 <PID>
\\n
Often apache is still running in the background. In that case you can kill it using
\\n
$ sudo pkill apache2
\\n
How can I upload local files to my project?
\\n
Either drag a local file directly from your desktop into the Cloud9 file tree,\\nor use the "File > Upload Local Files" menu item.
\\n
How can I download my project files?
\\n
Use "File > Download project". Currently, this will give you a .tar.gz file, which\\nensures maximum portability. To open these files, you can use something like\\nWinRAR or 7-zip.
\\n
How can I share a single directory of a private workspace
\\n
Sometime you might want others to open a file or directory in the browser \\nwithout opening up the whole workspace. This can be done by starting a small \\nhttp server in that directory and make sure that the running application is public.
\\n
To make the running application public you have to click the "sharing" button at\\nthe top right and the check "public" for application.
\\n
To run the server open a terminal and do
\\n
$ cd /dir/i/want/to/share\\n$ python3 -m http.server 8080
I cannot create a SSH workspace using a Digital Ocean droplet
\\n
We recently discovered our web host is blocking connections to some Digital Ocean IP addresses because they suspect they are being used by Iranian users. They are legally forced to block them.
\\n
Digital Ocean maintains a whitelist of droplet IP addresses which should not be blocked and our web host follows this list.
\\n
Please raise a support ticket with Digital Ocean mentioning that you would like to have your droplet IP added to the whitelist. After this is complete you will be able to create your SSH workspace within 24 - 48 hours.
\\n
I'm getting an error on the SSH install script: "ncurses not found"
The color picker is an awesome feature in Cloud9 IDE, designed to not only make color selections easier, but also, more harmonious. At its core, the color picker is a way to represent words (red, blue, e.t.c.), RGBA values (rgba(175, 3, 124, .6)), or hex values (#f00f00) into actual colors.
\\n
To enable the color picker, flip the preferences on in the Settings panel. You can use the color picker in CSS, SVG, HTML, or APF Skin files. All you have to do is hover over the value of a color definition, and it'll instantly highlight, like this:
\\n
When the represented color is highlighted, click on it. You'll get a color square defining all the possible color arrangements. To select a color, you can click in the square, pick your own RGB or HSB values, or enter some hex code. Best of all, at the bottom of the window, you'll find a list of other colors found within the same document--just in case you want to achieve matching shades:
\\n
To set the value, just click anywhere outside of the color picker.
For JavaScript files, Cloud9 provides analysis using a combination of our own analysis tools, as well as JSHint (specifically for Javascript code). Our language analysis can't detect if your program is correct, fast, or has memory leaks, but it can save you time by spotting things like undeclared variables, syntax errors, or other preventable typos.
\\n
When Cloud9 detects an issue with your code, an icon appears in the gutter for the offending lines of code. There are three types of identifiers available for your code:
\\n
\\n
Informational (): these are non-critical, non-dangerous updates about your code
\\n
Warnings (): these are potentially incorrect pieces of code
\\n
Errors (): these are incorrect lines of code that will almost certainly throw a runtime error when you try to run your script
\\n
\\n
If you hover over any of these icons in the gutter, you'll get a pop-up that presents some information as to what, exactly, the problem is. For example, suppose we have a variable declared, called fs, that is never used:
\\n
Notice also that fs has a strikethrough, to provide further visual clues that something is not quite right.
\\n
If you're concerned with the level of information that's listed in the gutter, you can always configure its "strictness" in the IDE preferences. For example, you could choose to hide every icon that isn't a warning or an error.
\\n
Configuring Global Options
\\n
JSHint provides additional configuration options that Cloud9 incorporates on a per-file basis. Typically, you declare these options as comments at the very top of a file, like this:
\\n
/*jshint curly:true, debug:true */
\\n
For a full list of the JSHint configutation options, please check the documentation page describing them.
For Javascript programs, Cloud9 IDE provides intelligent and responsive autocompletion for your code. Autocompletion is based not only on the content within your files, but also on the ECMAScript and Node.js standard library:
\\n
\\n
Methods defined in ECMAScript and Node.js also have documentation provided for you. Simply hover over a method name for a moment, and a second box quickly shows some additional information.
\\n
You can disable autocompletion in the Settings menu.
Luckily you're not limited to the default set of Runners in Cloud9.\\nYou can simply define your own custom Runner, which is both simple and very powerful.\\nAll you need to do is create a Runner file.\\nIn this article we'll describe how to do this in just a few steps.
\\n
In the Run panel (usually at the bottom of the UI), click the 'Runner' text input and choose 'New Runner'. \\nIn the new Runner file that's now opened, you can configure your runner\\nusing a simple JSON format. We'll show a basic example below\\nand then explain the different properties you can use.
\\n
Let's start with a basic example: a runner for go files.
This runner will use "go run" for any file that has a ".go" file extension.\\nIf you add it, it'll override our default Go runner.
\\n
As another example, let's save a new Node 0.11 configuration, including Harmony support. \\nCreate a new Runner, add this code, and save it as 'Node 0.11.x.run':
\\n
// This file overrides the built-in Node 0.11.x runner\\n// For more information see http://docs.c9.io:8080/#!/api/run-method-run\\n{\\n \\\"cmd\\\": [\\n \\\"bash\\\",\\n \\\"--login\\\",\\n \\\"-c\\\",\\n \\\"nvm use 0.11 > /dev/null; node --harmony ${debug?--nocrankshaft --nolazy --debug-brk=15454} '$file' $args\\\"\\n ],\\n \\\"debugger\\\": \\\"v8\\\",\\n \\\"debugport\\\": 15454,\\n \\\"info\\\": \\\"Your code is running at \\\\\\\\033[01;34m$url\\\\\\\\033[00m.\\\\n\\\\\\\\033[01;31mImportant:\\\\\\\\033[00m use \\\\\\\\033[01;32mprocess.env.PORT\\\\\\\\033[00m as the port and \\\\\\\\033[01;32mprocess.env.IP\\\\\\\\033[00m as the host in your scripts!\\\\n\\\"\\n}
\\n
Note:
alternatively, you can check 'Show Hidden Files' in your workspace directory tree (the small gear in the upper right corner), and create a new file in the '.c9/runners' folder called 'Node 0.11.x.run' with this code.\\n\\n
\\n
That's it! Your custom Runner should be available in the Run panel.
\\n
Runner Variables
\\n
Here's a list of all the variables you can use in your runners:
\\n
\\n
$file_path The directory of the current file, e. g., /home/ubuntu/workspace/docs
\\n
\\n
$file The full path to the current file, e. g., /home/ubuntu/workspace/docs/Chapter1.txt.
\\n
\\n
$args Any arguments entered after the file name.
\\n
\\n
$file_name The name portion of the current file, e. g., Chapter1.txt.
\\n
\\n
$file_extension The extension portion of the current file, e. g., txt.
\\n
\\n
$file_base_name The name only portion of the current file, e. g., Document.
\\n
\\n
$packages The full path to the Packages folder.
\\n
\\n
$project The full path to the current project file.
\\n
\\n
$project_path The directory of the current project file.
\\n
\\n
$project_name The name portion of the current project file.
\\n
\\n
$project_extension The extension portion of the current project file.
\\n
\\n
$project_base_name The name only portion of the current project file.
\\n
\\n
$hostname The hostname of the workspace.
\\n
\\n
$hostname_path The hostname of the workspace together with the relative path of the project file.
\\n
\\n
$url The full url to access the workspace.
\\n
\\n
$port The port assigned to the workspace.
\\n
\\n
$ip The ip address to run a process against in the workspace.
this article is outdated, a new version will follow soon\\n\\n
\\n
\\n\\n
\\n\\n
Let's say you're working a large project containing many files, and you kind-of sort-of know the name of a file that you want to open up. Goto File is our feature to help you quickly and easily jump to any file in your workspace, without the need to search through different directories. Simply hit Cmd-E (or Ctrl-E on Unix/Windows) and away you go:
\\n
\\n
Goto File offers filtering for any portion of a filename, including directories. Search for the beginning, middle, or end of a file path, or even just an extension, like .js, and Goto File with instantly present the results to you. Clicking on a name in the list opens the file right up. Goto File does not support case-insensitive, wildcard (*, ?), or regular expression (., +) searching.
\\n
Goto Definition takes the same concept and applies it to files. You can easily navigate between classes and members defined in your files. By entering text, you can filter your class' member results. Finally, as you navigate through your file, Cloud9 IDE will jump to the relevant portion of the code:
\\n
\\n
Note:
Currently, Goto Definition only works for Javascript files.\\n\\n
\\n
Another feature that's available is the capability to "jump to definition." If your cursor is on a variable or function name, you can tap F12 (or type jumptodef in the console) to instantly scroll the editor to the member's definition.
this article is outdated, a new version will follow soon\\n\\n
\\n
Collaboration with Cloud9 IDE is an amazing feature that lets you do more than just share your projects with any other Cloud9 developer. You can grant someone else access to change files in your workspace, in realtime--or just let them view the workspace without any other rights. While you're collaborating, you can discuss the code through a built-in chat room.
\\n
To invite someone to collaborate on a project with you, simply copy the URL in the browser and send it to a friend. You can also click on Share in the menu bar to get quick access to other ways to share, such as via e-mail, Twitter, or Facebook.
\\n
Let's take a look at some of the additional features available while you collaborate.
\\n
Members List
\\n
There are two terms used for people accessing your project: members and visitors. Members are individuals that have read and write access to your project--that means they can change any code; visitors only have read access. The Members panel lists all the collaborators in a project, both active and inactive:
\\n
\\n
If you are the owner of a project, you can click on anyone's username to grant (or revoke) write access:
\\n
\\n
If you're worried about the sanctity of your code after grant access to other developers, fear not. You can always take a look at a file revision history to view line-by-line changes made to your project over time.
\\n
Chatting
\\n
Any member or visitor can participate in group chat with each other. Developers can also choose to double-click on a person's username and engage in a private, instant-message-style conversation.
\\n
Collaborate on Code
\\n
When a collaborator changes a file you're also working on, Cloud9 detects it and asks you whether you'd like to use their changes, or your version. We're also simply giving you the option to merge both, using a three-way-merge algorithm to handle any conflicts. This is the same algorithm used by version control systems like git for merging branches.
\\n
To make the experience even smoother you can choose "Always merge by default" and we'll never interrupt you about file changes again.
\\n
Check out the video below to see this in action.
\\n
\\n\\n
\\n\\n
\\n \\n \"\n },\n {\n \"filename\": \"searching_in_files\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Searching and Replacing in Files\",\n \"contents\": \"\\n \\n
Searching and Replacing in Files
\\n
\\n\\n
\\n\\n
Aside from Goto File and Goto Definition, Cloud9 also offers more traditional search functionality. There are three types of search modes available: quicksearch, search and replace, and find in files.
\\n
Quicksearch
\\n
Quicksearch can be activated by hitting Cmd-F on a Mac, or Ctrl-F on a Unix/Windows machine. As you type in the quicksearch bar, the IDE instantly shifts to the next available result. This is a great way to quickly search around in your code without hassle.
\\n
Quicksearch offers the following options:
\\n
\\n
Regular Expressions: when enabled, your search is treated as a regular expression
\\n
Match Case: when enabled, your search takes capitalizations seriously:
\\n
Whole Words: when enabled, your search will only be considered for whole words:
\\n
Search Backwards: when enabled, the search goes backwards, instead of forwards
\\n
Wrap Around: when enabled, the search loops around the file, from bottom to top
\\n
Search Selection: when enabled, the search only considers code that you've currently highlighted
\\n
\\n
Search and Replace
\\n
Building on the features of quicksearch, search and replace allows you to replace segments of code in your file. You can again continue to use regular expressions, keeping in mind the groupings are prefixed with a dollar sign, i.e.$1.
\\n
Replacing offers two more options:
\\n
\\n
Preserve Case: if enabled, case is preserved while replacing content
\\n
Highlight Matches: if enabled, the new replaced matches are highlighted in the document
\\n
\\n
Find in Files
\\n
In order to search across a set of files, you'll want to use the Find in Files feature. Here, you can search of a string or regular expression, within your entire workspace or a single directory. You can also filter based on extensions, like *.js or *.rb.
\\n
Find in files offers some of the same search options as quicksearch:
\\n
\\n
Regular Expressions: when enabled, your search is treated as a regular expression
\\n
Match Case: when enabled, your search takes capitalizations seriously
\\n
Whole Words: when enabled, your search will only be considered for whole words
\\n
\\n
One more feature of find in files is the ability to render search results either in the console or the IDE. You can fold results to keep them out of the way, or, edited the file if you're working down a list:
Multiple cursors is one of the most useful features available in the Cloud9 editor. You can use multiple cursors to perform tasks like rename several variables or members at once, break up lists separated by commas, or insert the same text in multiple locations.
\\n
\\n
Multiple selections can be copied and pasted, and you can insert or remove entire lines in several locations.
\\n
There are several ways to get access to mutliple cursors:
\\n
\\n
Via keyboard shortcuts, you can create a new cursor in any direction
\\n
By holding the Alt key, clicking the mouse, and dragging the cursor up or down in the editor
\\n
Through the menu bar at Selection>Multiple Selections
\\n
\\n
One of the best capabilities is the ability to instantly select the next instance of your currently highlighted section. This is especially useful for refactoring several parts of the code at once. To do this, press Ctrl-Alt, followed by the right (or left) arrow key to navigate around in the code.
Cloud9 IDE has varying levels of support for different programming languages. \\nUsually you will at least have Syntax Highlighting in the editor and the ability\\nto run apps from the Terminal.
\\n
Syntax Highlighting
\\n
Cloud9 IDE develops and builds on Ace, an \\neditor for writing code online. Cloud9's Ace editor currently supports \\nhighlighting for about 100 programming languages, and any changes made to Ace are \\nreflected back into Cloud9 IDE.
\\n
The list of supported languages is growing, and you can get the full list from \\nthe View>Syntax menu. Feel free to create an issue in the Ace repository \\nfor new requests, or add your own syntax highlighting mode.
The Run panel currently supports running the following by default:
\\n
\\n
Apache httpd (PHP, HTML)
\\n
Node
\\n
Python
\\n
Ruby
\\n
Ruby on Rails
\\n
Go
\\n
CoffeeScript
\\n
Julia
\\n
Mocha
\\n
Shell script
\\n
\\n
If you'd like to run any other language, simply create a new "Runner".
\\n
You can also do so from the Terminal. \\nEach workspace is an Ubuntu VM with the standard tools like bash, make, \\ngcc, vim, java SDK or perl pre-installed.
Cloud9 IDE develops and builds on Ace, an editor for writing code online. Ace supports over two dozen different themes for highlighting your code, and any changes made to Ace are reflected back into Cloud9 IDE.
\\n
You can change your current theme by going to View>Themes, and selecting from one of the many options. By hovering over the menu items, you'll be able to get a preview of the theme. To activate a theme you like, just click on its name.
\\n
The IDE contains the following themes:
\\n
\\n
Chrome
\\n
Clouds
\\n
Clouds Midnight
\\n
Cobalt
\\n
Crimson Editor
\\n
Dawn
\\n
Eclipse
\\n
Idle Fingers
\\n
Kr Theme
\\n
Merbivore
\\n
Merbivore Soft
\\n
Mono Industrial
\\n
Monokai
\\n
Pastel On Dark
\\n
Solarized Dark
\\n
Solarized Light
\\n
TextMate
\\n
Tomorrow
\\n
Tomorrow Night
\\n
Tomorrow Night Blue
\\n
Tomorrow Night Bright
\\n
Tomorrow Night Eighties
\\n
Twilight
\\n
Vibrant Ink
\\n
\\n
By default, files are highlighted based on their file extension. You can change this by going to View>Syntax, and selecting a different context. This forces a single file to use a different highlighter.
\\n
We support highlighting for at least the following languages, and many more:
\\n
\\n
CoffeeScript
\\n
ColdFusion
\\n
C#
\\n
CSS
\\n
Go
\\n
Groovy
\\n
haXe
\\n
HTML
\\n
C/C++
\\n
Clojure
\\n
Java
\\n
JavaScript
\\n
JSON
\\n
LaTeX
\\n
LESS
\\n
Liquid
\\n
Lua
\\n
Markdown
\\n
OCaml
\\n
Perl
\\n
pgSQL
\\n
PHP
\\n
Powershell
\\n
Python
\\n
Ruby
\\n
OpenSCAD
\\n
Scala
\\n
SCSS
\\n
SH
\\n
SQL
\\n
SVG
\\n
Text
\\n
Textile
\\n
XML
\\n
XQuery
\\n
YAML
\\n
\\n
We are always adding new themes and new languages to support, so check the menu often! Since we use Ace to provide syntax highlighting, feel free to log an issue there for new requests.
Cloud9 IDE allows you to easily add files to your curent workspace at any time. You can drag and drop files from your computer directly into the Project Files pane, and the IDE will add them to your project. Google Chrome users can also drag entire folders into the IDE.
\\n
If a file transfer is halted for some reason--say, if you lose your internet connection--the upload resumes once the connection returns. As the files transfer, the IDE lets you know the current status of the overall transfer, as well as the status of each file being uploaded:
\\n
\\n
You can also get an exact copy of your workspace to save on your computer. By going into File>Download Project, you will be provided with a Zip file containing the entirety of your project.
For Drupal there are some installation guides around which tell you to install PHP first, but that's not necessary with Cloud9.\\nYou don't need to install MySQL either, it is already preinstalled in PHP workspaces. \\nJust make a new workspace, choose PHP, go to the Terminal, and execute the following:
\\n
cd $HOME\\ncurl -O http://ftp.drupal.org/files/projects/drupal-7.30.tar.gz\\ntar xvf drupal-7.30.tar.gz\\nmv drupal-7.30/* workspace/\\nmv drupal-7.30/.htaccess workspace/\\ncd $HOME/workspace\\nmysql-ctl install\\nmysql-ctl start\\nmysql-ctl status
\\n
Open the file install.php in the file tree, and while opened, click on the "Run Project" button in the menu bar on top of the IDE.\\nAn URL will be shown at the bottom of the page, something like "https://drupal-c9-lcipriani.c9.io/", but with your username and workspace name in it.
\\n
Copy the url in a new browser tab and you will see the install page of Drupal
\\n
You can now proceed with the installer
\\n
\\n
Now be careful inserting the correct values for the database. You need to change the values as follows:
localhost will not work, while 127.0.0.1 will.\\n\\n
\\n
Open the Advanced Options in the database settings page as shown in the screenshot:
\\n
\\n
Now fill the form with the correct site information:
\\n
\\n
Continue the setup and enjoy your website!
\\n
Note:
if you are not able to load CSS, access your website WITHOUT using https, but use simple http; in another tab open the url: http://drupal-c9-lcipriani.c9.io/\\n\\n
When you're working with git repositories, it's helpful to know who made a commit to a particular piece of code. As it turns out, git has a feature called git blame that we've integrated directly into Cloud9 IDE.
\\n
By using git blame, you'll be able to instantly discover who edited certain lines of code, when they edited it, and what their commit message at the time was. Clicking on a git commit also highlights other lines of code changed at the same time. To launch the git blame feature, open a file and navigate to Tools>Git>Blame.
Zen mode is a full screen coding environment designed to make you more productive. It essentially removes all the additional UI elements in Cloud9 IDE, and places you in a harmonious relationship with your code.
\\n
To activate zen mode, simply hover over the upper right corner of the code editor, and click the icon that appears. Keep in mind that you'll need to have a file open before you can launch zen mode. You can resize your window by holding and dragging the left or right border.
\\n
To get out of zen mode, hover over the same corner and click the same icon.
\\n
You can also enter and exit zen mode via keyboard shortcuts, command line, or from the menu bar at View>Zen Mode.
Run Ghost by typing npm start in the console or by opening index.js and\\nhitting the run button.
\\n
\\n
Click the "Preview" button in the top menu in the IDE, and choose \\n"Preview with Web Server". This will open the Preview window for your newly setup Ghost blog
\\n\\n
Change the URL to /ghost and create your admin user to login to the Ghost admin interface
Joomla is a popular open source CMS. \\nInstalling Joomla is very straightforward, but there are just a few quirks to keep in mind, which we describe below.
\\n
Note:
all instructions here are based on Joomla v3.x.\\n\\n
Joomla requires a MySQL database to connect to. MySQL is pre-installed in your workspace, so just execute these commands:
\\n
mysql-ctl install\\nmysql-ctl start
\\n
... and then note the credentials to use in the configuration of Joomla later on.
\\n
Install Joomla
\\n
To run the Joomla installer, open index.php and run it with the "Run" (or "Run Project") button at the top of the IDE.\\nNext, click the URL that's displayed in the Run panel, which looks something like https://joomla-c9-username.c9.io/installation/index.php#. \\nThis will open up the Preview window with the installer.
\\n
Now, here comes the quirky part: the installer will not work properly if it's loaded over HTTPS, as the Cloud9 Preview window does by default.\\nSo, in order to make the Joomla installer work, do the following:
\\n\\n
Pop out the Preview by clicking the Popout icon (or copy & load the URL in a browser tab)
\\n
Change the URL from https:// to http:// and load it
\\n\\n
Now you should be able you to get through the installer successfully.
\\n
Main configuration
\\n
The main Configuration screen should look like this:
\\n
\\n
Enter whatever values you'd like here.
\\n
Database
\\n
The second quirky and important thing to keep in mind in the Database section, is to use Host Name "0.0.0.0" instead of "localhost".
\\n
So use values like shown in the screenshot below:
\\n
\\n
Finally
\\n
Use whatever settings you'd like in the final installation screen, and after it completes, have Joomla remove the Installation folder for safety.
\\n
That's it, you're done and your Joomla setup should run fully on Cloud9!
this article is outdated, a new version will follow soon\\n\\n
\\n
\\n\\n
\\n\\n
Every time you save a file on Cloud9, a diff of any changes made to it is saved by the server. Over time, you can view these file revisions as content is added and removed from your files. You can also restore a file to any previously saved state; you'll never have to worry about losing your work ever again!
\\n
To access file revisions, you can either go to File>File Revisions History, or type Cmd-B on Mac or Ctrl-B on Linux/Windows. This will pop open the Revisions History panel. Red lines indicate lines that were removed; green lines indicate lines that were either added or changed.
\\n
At the bottom of the panel, there's a checkbox for showing all of a file's changes. Files changes that occur relatively soon to one another--say, a few seconds--are grouped by the revisions panel as one "change." If you prefer to see every single change as an individual entry, enable the Show all file changes checkbox.
\\n
To restore a file to a previous revision, simply click the revisions button for that entry:
Koa is a new web framework designed by the team behind Express, which aims to be a smaller, more expressive, and more robust foundation for web applications and APIs.
\\n
To get started with a Koa app, first create a workspace and choose either the Node.js type, or a Custom workspace type for a clean workspace.
\\n
Koa.Js makes use of the new generator feature in javascript ECMA 6. \\nThis feature is support in Node from 0.11 and up by toggling the --harmony flag. \\nBy default Cloud9 runs Node v0.10.x or v0.8.x, depending on your setup, so we first need activate Node version 0.11.x.
\\n
Open a Terminal, or using the pre-existing one at the bottom and execute the following in your Terminal:
\\n
nvm use 0.11
\\n
Next, we need to install Koa itself:
\\n
npm install koa
\\n
Now we can create a simple Koa.Js server.\\nCreate a server.js file in your root folder with this code:
\\n
var koa = require('koa');\\nvar app = koa();\\n\\napp.use(function *(){\\n this.body = '<h1>Hello from Koa.Js</h1>';\\n});\\n\\napp.listen(process.env.PORT);
\\n
If you now press the Run button on top of the IDE, you will see some errors, as the runner/debugger defaults to 'Node (default)', which is Node version 0.10.x or 0.8.x.
\\n
Luckily all you need is to create a Runner file so Cloud9 can run Node 11.x in harmony mode and thereby support generators.
\\n
In the Run panel below, click the 'Runner' text input and choose 'New Runner'. \\nIn the new Runner file that's opened, save the following code as 'Node 0.11.x.run':
\\n
// This file overrides the built-in Node 0.11.x runner\\n// For more information see http://docs.c9.io:8080/#!/api/run-method-run\\n{\\n \\\"cmd\\\": [\\n \\\"bash\\\",\\n \\\"--login\\\",\\n \\\"-c\\\",\\n \\\"nvm use 0.11 > /dev/null; node --harmony ${debug?--nocrankshaft --nolazy --debug-brk=15454} '$file' $args\\\"\\n ],\\n \\\"debugger\\\": \\\"v8\\\",\\n \\\"debugport\\\": 15454,\\n \\\"info\\\": \\\"Your code is running at \\\\\\\\033[01;34m$url\\\\\\\\033[00m.\\\\n\\\\\\\\033[01;31mImportant:\\\\\\\\033[00m use \\\\\\\\033[01;32mprocess.env.PORT\\\\\\\\033[00m as the port and \\\\\\\\033[01;32mprocess.env.IP\\\\\\\\033[00m as the host in your scripts!\\\\n\\\"\\n}
\\n
Note:
alternatively, you can check 'Show Hidden Files' in your workspace directory tree (the small gear in the upper right corner), and create a new file in the '.c9/runners' folder called 'Node 0.11.x.run' with this code.\\n\\n
\\n
Let's run server.js with this new configuration; in the Run panel on the bottom, choose your new 'Node 0.11.x' Runner, and press Run again.
\\n
You Koa.Js server should now be up and running.
\\n
Now if you click the Preview button in the top menu in the IDE, and choose "Preview with Web Server", this will open the Preview window for your running app.
Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.
\\n
To get started with an Express app, first create a workspace and choose either the Node.js type, or a Custom workspace type for a clean workspace. Open the new workspace (or an existing one) to follow the instructions below.
\\n
Installation
\\n
First we'll install the Express project generator and generate an application stub:
You might want to take a look at package.json and update the application name from the default workspace to something more fitting.
\\n
Running
\\n
Now you have a fully configured express application already. You can run it from the terminal using:
\\n
$ bin/www
\\n
Now if you click the Preview button in the top menu in the IDE, and choose "Preview with Web Server", this will open the Preview window for your running app.
\\n
Creating a Run Configuration
\\n
In order to make life easier you can create a run configuration for express.
\\n\\n
Click Run -> Run Configurations -> Manage ...
\\n
Click Add New Config
\\n
In the run panel fill in Express as name, bin/www as the command and Node 0.10.x as the runner.
\\n
You can optionally make this run configuration the default runner by clicking Set As Default. If you do so then clicking the run button will always run the app and not the currently opened file.
\\n\\n
The finished run configuration should look something like this
For Laravel there are some installation guides around which tell you to install PHP first, but that's not necessary with Cloud9.\\nJust make a new workspace, choose PHP, go to the Terminal, and execute the following:
As lavarel is serving its content from the public directory we need to modify the apache config:
\\n
sudo vi /etc/apache2/sites-enabled/001-cloud9.conf
\\n
Then do the following:
\\n
// Change this line\\nDocumentRoot /home/ubuntu/workspace\\n\\n// To following\\nDocumentRoot /home/ubuntu/workspace/public
\\n
Run the project with the "Run Project" button in the menu bar on top of the IDE.\\nIf you click the URL that appears in the Run panel below (in the shape of 'https://laravel-c9-username.c9.io/'), you can preview your new Laravel app.
Open your Terminal and execute the following to create a new Symfony-Project\\nYou need the first line only if you used the PHP Project type for your workspace.
The create-project composer command will ask for a few parameters, the only one you need to pay special attention is the database-host parameter.
\\n
Running the project
\\n
There is a IP address checking in the web/app_dev.php file. To disable this check please remove the following lines
\\n
// This check prevents access to debug front controllers that are deployed by accident to production servers.\\n // Feel free to remove this, extend it, or make something more sophisticated.\\n if (isset($_SERVER['HTTP_CLIENT_IP'])\\n || isset($_SERVER['HTTP_X_FORWARDED_FOR'])\\n || !in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1'))\\n ) {\\n header('HTTP/1.0403 Forbidden');\\n exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');\\n }
\\n
After that add a new run configuration in Menu Run > Run Configurations > New Run Configuration. Select Apache http (PHP, HTML) as a Runner and web/app_dev.php as Command.\\nThat's it after you hit Run your server will start up and you can access your new Symfony project.
On Hosted and SSH workspaces, Cloud9 provides two ways to run your application:
\\n\\n
Using the Run panel with built-in Runners for many languages
\\n
From a Terminal
\\n\\n
Method 1: Use the Run panel
\\n
First, open the file you want to run.
\\n
Next, click on the Run button in the top menu bar in the IDE.
\\n
\\n
The Run button acts as a sort of shortcut to the Run panel, which will appear by default in the bottom of the IDE when you run a file.\\nThis automatically runs the currently active file, and it will guess which Runner to use based on the extension of the file.
\\n
When you're ready to stop your app, click on the Stop Button button in the menu bar at any time, or from the Run panel below.
\\n
\\n
On the Run panel, you'll notice a few more options you can set. \\nFilling these textboxes out creates a Run Configuration.
\\n
\\n
Name: the name of your run scenario
\\n
Command: the command you want to run; this is usually the location of your running file in your project, but it also allows you to provide any additional command line arguments you want to pass to your app
\\n
Runner: defines how you want your code to be run. A wide range of Runners is available by default, from Apache to Node.js and Shell scripts, and you can define your own.
\\n
CWD: Set the current working directory to start from
For some default runners like Node.js, it's an option to Run in debug mode, which indicates that you want to run the current code through the debugger. \\nThis will reveal (or collapse) the debugging tools panel described in Running and Debugging your code.
\\n
Method 2: From the Terminal
\\n
The built-in Terminal provides access to all underlying system commands, including your Runners such as Node.js. \\nSimply open up a Terminal from the "+" sign, or use CMD+T (Mac) / Control+T (Windows), and then execute the command you need to run your app, e.g. node server.js.
\\n
(Pre-)View your application
\\n
To find out where your application is running you can do two things:
\\n\\n
Use the Preview button on the top to preview one of your files. The URL in the browser bar in the Preview can also be used in any browser tab/window.
\\n
Use the Share button on the top to figure out the URLs of running Application and the Preview. The Editor URL is only used to share your entire Cloud9 workspace to collaborate on code.
\\n\\n
Tip:
If you can't find how to preview your running app, try to use port 8080 in the URL.
\\n\\n
\\n \\n \"\n },\n {\n \"filename\": \"setup_a_database\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Set up a database\",\n \"contents\": \"\\n \\n
Set up a database
\\n
MySQL
\\n
From the Terminal, run the following command:
\\n
$ mysql-ctl install
\\n
The output will be:
\\n
MySQL 5.5 database added. Please make noteof these credentials:\\n\\nRoot User: username\\nDatabase Name: c9
\\n
Now you can connect to the database using the ip 127.0.0.1 and the default port 3306.\\nYou can also test it using our tool from the Terminal:
After you have logged into Cloud9, you are placed into your account's dashboard. From here, you can edit your profile and manage workspaces you have access to.
\\n
\\n
In the top-left corner of the dashboard, your username is displayed. Within the user context, you can view your user profile by clicking on Your Account:
\\n
\\n
The user profile contains:
\\n
\\n
Your recent activities, including a list of actions you have recently performed, such as cloning, opening, and deleting projects
\\n
Your add-on services, which you've integrated into Cloud9. Currently, these are GitHub and Bitbucket.
\\n
Your account settings, where you're given the following choices:
\\n
Change your password
\\n
Show your SSH key
\\n
Upgrade to premium (or, downgrade from it)
\\n
Delete your account
\\n
\\n
\\n
\\n
The gravatar that is used for your profile is handled by gravatar.com. If you don't have a gravatar yet, Cloud9 IDE uses an uninspiring default.
\\n
In the left panel, you'll find a list of various projects associated with your account. These are:
\\n
\\n
My Projects: these are projects you've created or cloned, and own
\\n
Shared With Me: these are projects shared with you by other Cloud9 users
\\n
Recently Visited: these are projects you've seen lately
\\n
Projects on GitHub: a list of your uncloned public and private GitHub projects
\\n
Projects on Bitbucket: a list of your uncloned public and private Bitbucket projects
You can always filter your project list by entering text in the text bar to find matching projects. If you need to update the list, click the refresh icon at the bottom of the panel:
"Hosted" is the best choice for most people, so in this short "Getting Started" article we'll only describe this option; for other options please read the full Creating a new workspace article.
\\n
The first step for creating a new workspace is click the "CREATE NEW WORKSPACE" button in your Dashboard:
\\n
\\n
At this point, you'll encounter two choices: Create a new workspace and Clone from URL. \\nIn this article we'll only describe the Create a New Workspace option, which allows you to create any of the previously mentioned types of workspaces (hosted, FTP, or SSH).
\\n
After clicking on Create a new workspace, you're taken to the screen below:
\\n
\\n
First, let's enter a workspace name.\\nDepending on whether you have a Free of Premium account, you can choose to make it either Public (open to anyone with the URL), or Private (only accessible to you and people you share it with).
\\n
After this, choose the type of workspace you want to create:
\\n
\\n
Hosted: This is a regular Cloud9 workspace, powered by a full Ubuntu environment. You even have sudo powers!
SSH, also called the "bring your own server" feature, lets you log into a server you own and run Cloud9 from there
\\n
\\n
Choose the "Hosted" workspace type to start from scratch with a 'Custom' workspace, or simply pick a pre-configured environment like Node.js, WordPress, or Python/Django, and immediately start developing your app.\\nThis way you don't need to spend valuable development time on system setup and maintenance, as we maintain it, and you control it.
\\n
\\n
As it's powered by a full Linux Ubuntu environment, hosted workspaces allow you to install any package (sudo apt-get install package), run git commands from the console to push your changes to a GitHub repo or a Bitbucket git repo, etcetera.
\\n
Now press Create. That's it! You can now see your new workspace in the dashboard:
this article is outdated, a new version will follow soon\\n\\n
\\n
Cloud9 IDE can be thought of as being divided into the following components:
\\n
\\n
Throughout the documentation, we'll refer to these sections by name. We can identify several distinct areas in the editor:
\\n
\\n
The top menu bar is the uppermost area, with easy access to a variety of menus
\\n
The project bar on the left lets you manipulate various aspects of your project, including its active files, preferences, and choices for deployment
\\n
The panel displays views according to what's been selected in the project bar
\\n
The toolbar is on the far right, where you can find tools used when debugging your code. Projects that are open with collaboration also make use of this panel for chatting.
\\n
The code editor is the main area where you write your code.
\\n
The console is the bottom area of the window. It's an expandable area that can act like a desktop terminal to enter command line input (like ls or mkdir). It also displays output provided by your program's print statements (like console.log()), as well as providing an area for search results
\\n
\\n
The Project Bar, Tool Bar, and Console are powerful features, so their documentation is provided separately. We'll talk about the rest of the editor below:
\\n
Remember: nearly every UI element can be collapsed, in order to provided a more harmonious coding experience. For example, clicking on the buttons in the upper left of the editor allows you to hide the panels and top menu bar:
\\n
The Top Menu Bar
\\n
\\n
In this section, you can find the usual menus for creating and saving files, changing your view, applying a new theme for the editor, and switching between windows.
The preview button provides you with a look of what the currently active file would look like in the browser. For text files, this is usually just the raw text, but certain files, like HTML or XML, render as the actual markup.
\\n
The autosave button indicates the status of your current saves: . Files are saved automatically by Cloud9 IDE, and every revision is made available for you to browse through. For more information, see the section on revisions and saving.
\\n
On the far right of the menu, near the Cloud9 IDE logo, there are two more icons: one to return to the dashboard, and one to return to the Cloud9 IDE homepage.
\\n
The Code Editor
\\n
This is where most of the action happens. Every file you open appears here as a tab. You can open a new file easily by clicking on the button to the right of the last tab. Cloud9 IDE offers syntax highlighting for over two dozen programming languages.
\\n
The code editor supports a large number of keyboard shortcuts to increase your productivity. For an up-to-date list of these within the IDE, simply go to Help>Keyboard Shortcuts.
\\n
If you hover over to the upper-right corner, you can activate zen-mode, which is a full screen coding environment.
As you develop your application, often you just want to quickly demo your work-in-progress to a colleague, customer, or friend. \\nOr you want to pull in a fellow dev to debug an issue, or to pair program.
\\n
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. \\nHere we describe how to access these options, and how to use each.
\\n
Share dialog
\\n
The best place to start sharing is from the dedicated "Share" dialog. \\nAccess it via the "Share" button on the right top of the IDE, or via the menu in Window > Share...
\\n
\\n
Here's what you see when you pull up the Share dialog:
\\n
\\n
Links to share
\\n
\\n
Editor: see section "Share your development environment"
\\n
Application: see section "Share your application"
\\n\\n
\\n
If you enable the "Public" checkbox for an option, it will make the URL accessible for anyone with the URL.\\nFor public workspaces all these URLs are public by default, but for private workspaces you have to enable them manually.
\\n
Who has access
\\n
This section refers to people you have specifically granted access to your entire development environment.\\n(R) gives Read access only to that person: the ability to open and view files, and to run your code.\\n(RW) or "Read/Write" also gives that person the ability to write to files.
\\n
Invite people
\\n
This section enables you to invite people to your workspace and immediately set if they have just "Read" or "Read+Write" rights. \\nYou can invite people by their email address or Cloud9 username. \\nYou can also choose whether or not send an automatic email to that person that they've been invited to your workspace.
\\n
Share your development environment
\\n
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.\\nYou'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.\\nSee the screenshot below for what this looks like:
\\n
\\n
In order to share your entire development environment, do one of the following:
\\n\\n
Make the URL publicly available to everyone: check the "Public" checkbox for the "Editor" in the "Links to Share" section.
\\n
Choose to share only with specific people: invite them from the "Invite people" section.
\\n
Grant/revoke access rights in the "Who has access" section.
\\n\\n
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.
\\n
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\\n\\n
\\n
Share your application
\\n
If you Run your application the result can be shared by copying the URL from the dialog. \\nThis 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
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.
\\n
Note:
alternatively you can just share the URL to your running app from the Preview panels' URL bar\\n\\n
\\n
Share a Preview
\\n
If you Preview a file in your application, it can be shared by copying the URL from the dialog. \\nThis 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
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.
\\n
Note:
alternatively you can just share the URL to your Preview from the Preview panels' URL bar\\n\\n
\\n
Tip:
If you can't find how to preview your running app, try to use port 8080 in the URL.
The Console is at the bottom of the IDE. It's where you can enter command line input, view output from your program, and push and pull your files between your code repositories.
\\n
Note:
The Console contains a full-fledged terminal, which provides you with a TTY interface for direct access to the machine that Cloud9 is running on.\\n\\n
\\n
Available Commands
\\n
The terminal can perform all Unix commands, and allows for path autocompletion by hitting Tab.
\\n
For instance, you can use mercurial commands (hg) and git commands (git) to communicate with the system, and to push your code between repositories. Typing hg or git shows the complete list of commands that are available for these services. For more information about these commands, please check their respective documentation:
To use mercurial commands on the project you are working on, you must have a mercurial project set up; the same holds true for git. Follow these links to learn more about how to set up these project in Cloud9:
The output tab in the Console shows information whenever a user is running or debugging a program. The content is similar to the output of a desktop terminal:
\\n
The output tab also displays the error and additional information that can improve your coding quality. You can use the Console to output results from your running application, just like a regular terminal.
\\n
As your process runs, you'll see a message similar to this one indicating that Cloud9 is running something in the background:
\\n
If you hover over this message, you can opt to cancel the process by clicking on the button:
We are choosing the PHP workspace type to in order to have the Apache runner\\nas a default so you can just click Run Project to get started. This doesn't\\nlimit the choice of the backend technology you might want to use.
this article is outdated, a new version will follow soon\\n\\n
\\n
Nearly every action in Cloud9 has a corresponding command associated with it. On top of that, every command also has a keybinding that can be used to effortlessly execute the command.
\\n
Below is a list of every single command and keybinding used by Cloud9. Have fun being efficient!
The editor is the most important element of any IDE; that's why Cloud9 developed ACE. ACE is a high-performance code editor for the web that supports over 40 different languages, over two dozen themes, and can still work faithfully on large documents (at last count, four million lines of code was the upper limit). It also contains a bevy of features you'd expect from traditional desktop editors. Among these include:
this article is outdated, a new version will follow soon\\n\\n
\\n
There are many different ways to configure the IDE. Below is a list of the options available, and what they do.
\\n
Note:
All of these options are on a per-project basis. Changing them in one project does not affect any another.\\n\\n
\\n
General
\\n
This section controls the overall IDE behavior:
\\n
\\n \\n
\\n
Preference Name
\\n
Description
\\n
\\n \\n \\n
\\n
Enable UI Animations
\\n
Enables or disables fluid animations for various UI elements, such as the Project Bar
\\n
\\n
\\n
Animate Scrolling
\\n
Enables or disables fluid animations when scrolling through code (such as for goto line)
\\n
\\n
\\n
Enable Auto-Save
\\n
If enabled, automatically saves your files on every change
\\n
\\n
\\n
On Save, Strip Whitespace
\\n
When saving a file, you can remove all extraneous whitespace from your code lines
\\n
\\n
\\n
Reveal Active File in Project Tree
\\n
Enabling this jumps the project tree to the active file whenever a tab changes to a different file
\\n
\\n
\\n
Warn Before Exiting
\\n
Prevents accidental data loss by showing a dialog asking if you really want to leave Cloud9 IDE when closing your browser
\\n
\\n
\\n
Node.js Runtime
\\n
Defines the default runtime for your Node.js code. "Auto" is based on whatever is in the package.json file, while "Default" reverts to Node 0.6.x.
\\n
\\n
\\n
Keybindings
\\n
Allows you to choose which operating system to use for keyboard shortcuts
\\n
\\n \\n
\\n
Language Support
\\n
This section controls language analysis options:
\\n
\\n \\n
\\n
Preference Name
\\n
Description
\\n
\\n \\n \\n
\\n
Enable Hints and Warnings Rules
\\n
Presents information about your code in the gutter
\\n
\\n
\\n
Highlight Variable Instances
\\n
Highlights variable instances in your code
\\n
\\n
\\n
Mark Undeclared Variables
\\n
Provides warnings if a variable is being used and has not been declared yet
\\n
\\n
Mark Unused Function Arguments
\\n
Provides a strikethrough for arguments in a function that are not being used
\\n
\\n
\\n
Warning Level
\\n
Specifies the minimum level of information severity you want provided in the gutter
\\n
\\n \\n
\\n
Code Editor
\\n
This section controls language analysis options:
\\n
\\n \\n
\\n
Preference Name
\\n
Description
\\n
\\n \\n \\n
\\n
Auto-pair Quotes, Brackets, etc.
\\n
When enabled, typing ", (, or [ will actually make two characters appear. In addition, whenever you highlight a word and type one of these characters, it is surrounded by that character (e.g. words becomes "words")
\\n
\\n
\\n
Full Line Selection
\\n
When highlighting lines, this option will highlight all ending whitespace, until the end of the editor window
\\n
\\n
\\n
Highlight Active Line
\\n
Presents a darker shade in the code editor to indicate which line you're currently on
\\n
\\n
Highlight Gutter Line
\\n
Presents a darker shade in the gutter which line you're currently on
\\n
\\n
\\n
Show Invisible Characters
\\n
Shows invisibles characters in the editor, like tabs and line breaks
\\n
\\n
\\n
Show Indent Guides
\\n
Shows the indent guides in the editor, letting you see your code's nestings
\\n
\\n
\\n
Show Gutter
\\n
Shows the gutter in the editor, which indicates line numbers, warnings, and errors
\\n
\\n
\\n
Highlight Selected Word
\\n
If you highlight a word, this highlights all matching words in the editor
\\n
\\n
\\n
Auto-hide Horizontal Scroll
\\n
When this is enabled, this will hide the horizontal scroll bar in the editor. Note that this has no effect in Mac OS X 10.7 (Lion) and above, since all scrollbars, by default, auto-hide.
\\n
\\n
\\n
Vim Mode
\\n
When enabled, allows you to use vim keybindings in the IDE
\\n
\\n
\\n
Code Folding
\\n
When enabled, allows you to show or hide "blocks" of code
\\n
\\n
\\n
Fade Fold Widgets
\\n
When enabled, fades the folding widgets in the gutter
\\n
\\n
\\n
Font Size
\\n
Changes the font size of the code in the editor
\\n
\\n
\\n
Show Print Margin
\\n
Shows (and defines) the number of characters possible in line, before it wraps
\\n
\\n
\\n
Soft Tabs
\\n
Indicates how many spaces a single tab represents
\\n
\\n
\\n
Mouse Scroll Speed
\\n
Defines the speed of the mouse scrolls
\\n
\\n
\\n
Newline Mode
\\n
Specifies the newline mode for the IDE
\\n
\\n \\n
\\n
Terminal
\\n
This section controls the behavior for the terminal:
\\n
\\n \\n
\\n
Preference Name
\\n
Description
\\n
\\n \\n \\n
Scrollback
\\n
Sets the scrollback buffer for the terminal
\\n
\\n
\\n
Font Family
\\n
Sets the font for the terminal
\\n
\\n
\\n
Font Size
\\n
Sets the font size for the terminal
\\n
\\n
Blinking Cursor
\\n
Specifies whether or not you want the cursor to blink
\\n
\\n \\n
\\n
Code Tools
\\n
This section controls the various tools that are available in the IDE:
this article is outdated, a new version will follow soon\\n\\n
\\n
The terminal provides you with a TTY interface for direct access to the machine that Cloud9 is running on. If you're running your own workspace, this is the server you've SSH'ed into. If you're using the hosted Cloud9 platform, this is the server your code runs on.
\\n
Warning:
While certain operations, like sudo, are restricted, you can completely destroy your workspace, by doing something like rm -rf. Use your power wisely!\\n\\n
\\n
To create a new terminal, go to View>Terminals>New Terminal, or simply type Alt-T on the keyboard. The terminal has the following capabilities:
\\n
\\n
Perform all Unix commands
\\n
You can create more than one instance of a terminal (by just creating a new tab)
\\n
The terminal allows for path autocompletion by hitting Tab
Jekyll is a great static site generator, also used by github pages. You simply need to install the Ruby gem and then make sure you pass the right port to the serve command.
\\n
$ gem install jekyll\\n$ jekyll new my-awesome-site\\n$ cd my-awesome-site\\n$ jekyll serve --port $PORT
\\n\\n
\\n \\n \"\n },\n {\n \"filename\": \"index\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Cloud9 IDE User Documentation\",\n \"contents\": \"\\n
Welcome to the official Cloud9 IDE documentation! Here, you'll find articles and tutorials to help you use the Cloud9 platform. These include everything from setting up a workspace, to learning how to run, debug, and deploy your code.
\\n\\n\\n
Getting started
\\n
Have a look at the "Getting Started" section on the left for an introduction into the basics of Cloud9.\\nFor instance, read up on how to:
If you're interested in troubleshooting specific aspects of the IDE, need help setting up an account, or just want to chat with our support team, please visit the Support pages.
\\n
Contact Us
\\n
Remember: All of our documentation content is open-sourced on GitHub, just like our amazing IDE.
\\n
See something that's not documented here? Simply add it to the documentation with a Pull Request, or send an e-mail to docs@c9.io, and we'll get it in.
\\n
Recently Updated Topics
\\n
Here's a list of the last five recently updated topics:
MySQL is the world's most widely used open source relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases.
\\n
MySQL's most common features
\\n
\\n
A broad subset of ANSI SQL 99, as well as extensions
Cloud9 IDE does not support installing a MySQL database (yet). As a workaround you can choose to connect your project to a MySQL database hosted elsewhere. Xeround\\noffers hosted MySQL instances and have a free tier available for getting started.
\\n
Xeround
\\n\\n
Register with Xeround
\\n
Log in to your controlpanel
\\n
Choose 'create new'
\\n
Choose a datacenter
\\n
Enter your Database name, Username and Password and create
\\n
Select your newly created instance and click the 'External DNS Hostname' link provided to log into PHPMyAdmin
\\n
Create and import/setup your database
\\n\\n
Cloud9
\\n\\n
Log into your account
\\n
Create a new project (or use an existing one)
\\n
Test the connection using the following script:
\\n
<?php\\n\\n $database = new mysqli('instanceNo.db.xeround.com', 'username', 'password', 'databasename', 'port');\\n\\n if($database->connect_errno > 0){\\n die ('Database Error' . $database->connect_error); \\n }else{\\n die ('Connected!');\\n }\\n ?>
this article is outdated, a new version will follow soon\\n\\n
\\n
The project bar is located towards the left of the Cloud9 IDE:
\\n
The buttons in the project bar allow you to reveal and hide panels for the IDE. In more detail:
\\n
\\n
Pressing on the Cloud9 icon collapses the panel area
\\n
Project Files shows your workspace's directory structure. You can view all your files here. Right-clicking within this panel reveals a drop-down menu with additional options, such as the ability to rename files or create new directories.
\\n
Active Files lists your files that are currently open.
this article is outdated, a new version will follow soon\\n\\n
\\n
Cloud9 IDE offers advanced tab features to make working with multiple files easy. By right-clicking on any tab, you'll open up the tab context menu:
\\n
\\n
These feature include:
\\n
\\n
Reveal in File Tree: opens the current file in the Project Files tree
\\n
Close Tab: closes the current tab
\\n
Close All Tabs: closes all the opened files
\\n
Close All But Current Tab: closes all the opened files, except the current one
\\n
Close Tabs to the Right/Left: closes all opened tabs to the right (or left) of the current one
\\n
File Revision History...: launches the revisions panel
\\n
\\n
To the left of the tab menu is another button that offers additional functions for tab navigation:
\\n
Tab Sessions
\\n
\\n\\n
\\n\\n
Tab sessions is a unique feature that is useful when dealing with projects that involve juggling between many tabs. Essentially, tab sessions lets you save the current state of the tabs. You can close your workspace, switch to a different branch, and instantly reload your previously opened files. You'll no longer need to work with opening and closing multiple files.
\\n
To use tab sessions, select Save Tab Sessions from the tab button menu. Give it a unique name. When you're ready to restore your tab sessions, just select Load Tab Sessions.
\\n
If you find that you've got too many tab sessions defined, you can always choose to delete them from the same tab menu.
The status bar is designed to provide you with all sorts of information about your code--and additional functionality--without getting in the way of the IDE. It's quite tiny, and quite powerful, like a weight-lifting squirrel.
\\n
You can find the status bar in the lower-right corner of the editor: . Keep in mind that the status bar is transparent, so it's able to camoflauge well with light or dark themes.
\\n
There's three pieces of crucial information available at all times: your current row, your current column, and, if you're highlighting characters, the status bar displays the number of bytes currently selected. If you're using Vim Mode, the status bar also tells you if you're in INSERT mode.
\\n
If you click on the status bar, it expands into a menu that provides a smaller set of the full IDE preferences. These options only deal with the IDE editor:
\\n
\\n \\n
\\n
Preference Name
\\n
Description
\\n
\\n \\n \\n
Show Invisibles
\\n
Shows invisibles characters in the editor, like tabs and line breaks
\\n
\\n
\\n
Wraps Lines
\\n
Wraps lines according to the line margin defined, or your browser's window. Otherwise, lines run off the current viewport.
\\n
\\n
\\n
Code Folding
\\n
When enabled, allows you to show or hide "blocks" of code
\\n
\\n
\\n
Full Line Selection
\\n
When highlighting lines, this option will highlight all ending whitespace, until the end of the editor window
\\n
\\n
\\n
Highlight Active Line
\\n
Presents a darker shade in the code editor to indicate which line you're currently on
\\n
\\n
\\n
Show Indent Guides
\\n
Shows the indent guides in the editor, letting you see your code's nestings
\\n
\\n
\\n
Show Gutter
\\n
Shows the gutter in the editor, which indicates line numbers, warnings, and errors
\\n
\\n
\\n
Highlight Selected Word
\\n
If you highlight a word, this highlights all matching words in the editor
\\n
\\n
\\n
Auto-pair Quotes, Brackets, etc.
\\n
When enabled, typing ", (, or [ will actually make two characters appear. In addition, whenever you highlight a word and type one of these characters, it is surrounded by that character (e.g. words becomes "words")
\\n
\\n
\\n
Auto-hide Horizontal Scrollbar
\\n
hen this is enabled, this will hide the horizontal scroll bar in the editor. Note that this has no effect in Mac OS X 10.7 (Lion) and above, since all scrollbars, by default, auto-hide.
\\n
\\n
\\n
Font Size
\\n
Changes the font size of the code in the editor
\\n
\\n
\\n
Show Print Margin
\\n
Shows (and defines) the number of characters possible in line, before it wraps
MySQL is the world's most widely used open source relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases.
\\n
MySQL's most common features
\\n
\\n
A broad subset of ANSI SQL 99, as well as extensions
This article explains our first iteration of MySQL support in Cloud9. It makes it super easy to install, start and stop a MySQL instance right in your workspace. The nice thing is that every workspace will run a separate database so your projects will never interfere with each other. You can control MySQL with the mysql-ctl command line tool run from the terminal:
\\n
# start MySQL. Will create an empty database on first start\\n$ mysql-ctl start\\n\\n# stop MySQL\\n$ mysql-ctl stop\\n\\n# run the MySQL interactive shell\\n$ mysql-ctl cli
\\n
You can then connect to the database with following parameters:
\\n
\\n \\n
\\n
Option\\n
Value\\n
Comment\\n
\\n \\n \\n
\\n
Hostname
\\n
$IP
\\n
The same local IP as the application you run on Cloud9
\\n
\\n
\\n
Port
\\n
3306
\\n
The default MySQL port number
\\n
\\n
\\n
User
\\n
$C9_USER
\\n
Your Cloud9 user name
\\n
\\n
\\n
Password
\\n
-
\\n
No password since you can only access the DB from within the workspace
\\n
\\n
\\n
Database
\\n
c9
\\n
The database name
\\n
\\n \\n
\\n
Importing data into your database
\\n
To import existing data into your database run following commands:
\\n
mysql-ctl cli
\\n
You are now in the MySQL environment and can start the import:
\\n
mysql> use c9\\nmysql> source PATH_TO_SQL_FILE.sql
\\n
To verify that everything got imported run:
\\n
mysql> show tables;
\\n
Note:
MySQL socket file can be found in ~/lib/mysql/socket/mysql.sock\\n\\n
Sometimes you run into issues when you run your project. Here you will find the most common issues and how to solve them.
\\n
Address in use or similar
\\n
The most common reason for an error thrown by your app stating that a port or address is in use is the fact that some process is already running/listening on that port/address. You need to take a look for those and kill the processes conflicting with your app:
\\n
// Find the process\\nlsof -i tcp:$PORT
\\n
If any relevant process is running you will get a list looking like this:
MongoDB is a scalable, high-performance, open source NoSQL database.
\\n
MongoDB's most common features
\\n
\\n
Document-Oriented Storage \\nJSON-style documents with dynamic schemas offer simplicity and power.
\\n
\\n
Full Index Support \\nIndex on any attribute, just like you're used to.
\\n
\\n
Querying \\nRich, document-based queries.
\\n
\\n
\\n
In addition, MongoDB has many scalability features such as:
\\n
Replication, Auto-sharding, Map/Reduce and GridFS
\\n
Running MongoDB on a Cloud9 workspace
\\n
MongoDB is preinstalled in your workspace. To run MongoDB, run the following below (passing the correct parameters to it). Mongodb data will be stored in the folder data.
You can start mongodb by running the mongod script on your project root: \\n$ ./mongod
\\n
MongoDB parameters used:
\\n
| Parameter | Description |\\n| ------------------------------ | ----------------------------------------------------------------------------------------------- |\\n| --dbpath=data | Because it defaults to /var/db which isn't accessible) |\\n| --nojournal | Because mongodb usually pre-allocates 2 GB journal file (which exceeds Cloud9 disk space quota) |\\n| --bind_ip=$IP | Because you can't bind to 0.0.0.0) |\\n| --rest | Runs on default port 28017 |
\\n
Drivers
\\n
You should use the host $IP instead of localhost as your driver connection url. \\ne.g. in Node, it is: process.env.IP
\\n
MongoDB has drivers for all supported runtimes. Following are the most commonly used drivers:
For this tutorial, we'll show you how to create and run a CoffeeScript project, entirely within the Cloud9 IDE. To run any coffeescript project, you'll need to first make sure to install the coffeescript module via the Node Package Manager (npm). We're going to walk you through how to do that with a sample project.
\\n
First, create a new project. Then, in the console, enter the following command:
This is a sample CoffeeScript application written by one of our developers. After cloning the project, you'll find three different files in the project tree: server.js, app.coffee, and README.md.
\\n
The README.md file contains instructions to install coffee-script using npm. We've integrated Node Package Manager into Cloud9 IDE to enable users to install Node programs. Thus, from the Cloud9 IDE command line, type the following command to install the Coffeescript module:
\\n
npm install coffee-script
\\n
Next, let's have a look at the server.js file. The first line is the require() function, which is used to load the coffee-script module that you have just installed. On the second line, we declare the CoffeeScript file that contains your application. In the last line, we specify the port the server is listening to. When projects run within Cloud9 IDE, you must retrieve the port information using process.env.PORT.
\\n
Now, let's look at what the CoffeeScript file does. It creates an HTTP server with a function that is called for each request. In the callback function, you create a response with a status code of 200 (indicating that the request was fulfilled successfully) and the message "Hello World". You use module.exports to enable the server.js file to use the code in the CoffeeScript file:
Did you know that you can use Cloud9 IDE to work on your WordPress website? It's true, and incredibly easy. You can't edit your posts on WordPress using Cloud9, since they are stored in a database on your server. But you can edit pretty much every other aspect of your site.
\\n
To start, you'll need to create a new FTP project. After that, enter your wp-content folder, find the theme you're using on your website, and start editing its style.
\\n
Thanks to the preview button in the menu bar, you can also witness your changes as they happen, before committing them to your server.
Since Cloud9 IDE is built on top of Node.js, we also leverage the module system NPM. In Cloud9, you can install any npm package either locally or globally. Note that due to security restrictions, modules installed globally can only be used in the project they were installed from. In other words, while you have access to any command line tools installed by the module, they are bound to the project, not your username. We run version 1.1.24 of npm.
\\n
To demonstrate the power of NPM, we'll build and run a quick express server:
\\n\\n
Launch the command line by hitting Shift-Escape. You can also go to View>Command Line if it's not visible.
\\n
Type npm install express, and wait for the npm install process to complete.
\\n
Create a new JavaScript file, and paste the following code:
\\n\\n
var express = require('express'),\\n app = express();\\n\\napp.use(express.logger());\\n\\napp.get('/', function(req, res){\\n res.send('Hello World');\\n});\\n\\napp.listen(process.env.PORT);\\nconsole.log('Express server started on port %s', process.env.PORT);
\\n
To launch your express server, click on the button in the menu bar.
Cloud9 supports the installation of Python packages for applications that need to go beyond the standard library set. Every workspace has version 0.6.10 of Python's easy_install package manager. For more information on this module, see the official easy_install documentation.
\\n
Let's try installing a package. First, type the following in the console:
\\n
easy_install markdown
\\n
This installs the markdown Python package to your workspace. You won't see the package installed in the directory tree, because it's kept deep within your project's the Python libs.
\\n
Next, create a new Python script, and add these lines of code:
\\n
import markdown\\n\\nhtml = markdown.markdown(\\\"# HELLO THERE!\\\")\\n\\nprint html
\\n
After clicking run, the console will correctly print out <h1>HELLO THERE!</h1>.
\\n
You have access to all of the functionality easy_install provides you. For example, you can open up the Python REPL and type the following to see a list of your installed packages:
SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world. The source code for SQLite is in the public domain.
\\n
Note:
SQLite supports full text search and ACID transactions (atomic, consistent, isolated, and durable)\\nWith its simplicity and zero-configuration, SQLite is a popular choice for new applications.\\n\\n
\\n
Getting started
\\n
You can open the terminal and create a database in a file db_test.db as follows:
\\n
\\n
Try yourself
\\n
$ sqlite3 db_test.db\\nSQLite version 3.6.20\\nEnter \\\".help\\\" for instructions\\nEnter SQL statements terminated with a \\\";\\\"\\nsqlite> create table tbl1(one varchar(10), two smallint);\\nsqlite> insert into tbl1 values('hello!',10);\\nsqlite> insert into tbl1 values('goodbye', 20);\\nsqlite> select * from tbl1;\\nhello!|10\\ngoodbye|20\\nsqlite> CREATE TABLE tbl2 (\\n ...> f1 varchar(30) primary key,\\n ...> f2 text,\\n ...> f3 real\\n ...> );\\nsqlite> .exit
\\n
To get to know sqlite commands, use the command: .help.
Cloud9 supports the installation of Ruby gems in your workspace using the RubyGems package manager. The current installed RubyGems version is 1.3.7. For more information on the gem command, see the official RubyGems documentation.
\\n
Let's try installing a gem. First, type the following in the console:
\\n
gem install progressbar
\\n
This installs the progressbar Ruby gem to your workspace. You won't see the gem installed in the directory tree, because it's kept deep within your project's the Ruby libs.
\\n
Next, create a new Ruby script, and add these lines of code:
\\n
require'progressbar'\\n\\nbar = ProgressBar.new(\\\"Example progress\\\", 50)\\ntotal = 0\\nuntil total >= 100\\n sleep(rand(2)/2.0)\\n increment = (rand(6) + 3)\\n bar.inc(increment)\\n total += increment\\nend
\\n
After clicking run, the console will start printing out an ASCII progressbar.
\\n
You have access to all of the functionality gem provides you. For example, you can open up the console and type gem query to see a list of your installed gems.
\\n \\n \"\n },\n {\n \"filename\": \"running_and_debugging_code\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Running and Debugging Your Code\",\n \"contents\": \"\\n \\n
Running and Debugging Your Code
\\n
Cloud9 IDE provides several ways to run and debug your code. We'll explore each of them in this section of the documentation.
\\n
Note:
Currently, only Javascript/Node.js applications can make use of the debugger. You can also execute Javascript/Node.js, Python, Ruby, and Apache+PHP applications.\\n\\n
\\n
The following information applies to all of the above programming languages.
\\n
Running Code
\\n
Running your code in Cloud9 is really easy. First, open the file you want to run. Usually, this file is going to be the main entry point to your app; for example, if you're creating a server, you'd want to run the file that actually instantiates that server.
\\n
There are two ways to run your code: either through the Run Panel, or through the run button in the menu bar.
\\n
Using the Run Panel
\\n
Next, click on the Run button in the project bar. You'll notice immediately that your active file is already available to run. Just double-click on the file, and you'll launch your app.
\\n
When you're ready to stop your app, click on the button in the menu bar at any time.
\\n
At the bottom of the run panel, you'll notice a few more options you can set. Filling these textboxes out creates a run scenario, which is like setting up some configurations for the way your code runs. These options are:
\\n
\\n
Name the name of your run scenario
\\n
File Path: the location of your running file in your project
\\n
Runtime: defines how you want your code to be run. Typically, you'd set different runtime versions here.
\\n
Cmd Line Args: allows you to provide any additional command line arguments you want to pass to your app
\\n
\\n
Of course, you can also save your run scenarios; just click on the add button at the top of the panel. When you're ready to run a scenario, click on its name in the Run panel list. To remove a run scenario, click on its name in the run panel list, and then click on the remove button.
\\n
Using the Run Button
\\n
The run button in the menu bar acts as a sort of short cut to the Run panel. When clicked, the button automatically runs the currently active file. If you have a list of run scenarios already defined, the run button also presents a list of those:
\\n
\\n
Run in debug mode indicates that you want to run the current code through the debugger. Auto show & hide debug tools will reveal (or collapse) the debugging tools panel described below. You can also work with this presentation by going to View>Panels, and configuring the debugger there.
\\n
Console Output
\\n
Every time you run a project, the console expands to reveal output from your program. If you're launching a server, Cloud9 provides you with a URL to access the project. Otherwise, any statements sent by your application's print statements (like console.log() for Javascript, print for Python, or puts for Ruby) are also shown here. For example:
\\n
Debugging Your Code
\\n
Setting up a project to debug is done in very much the same way as running your code. The only difference is that you must click on the run settings icon in the Run panel and select Run in debug mode. Similarly, you can select Run in debug mode from the run button.
\\n
Initially, the only difference this will make is the expansion of the debugging toolbar to the right of the editor:
\\n
This toolbar, however, grants you the following capabilities:
\\n
\\n \\n
\\n
Toolbar Icon
\\n
Debugging Function
\\n
Description
\\n
\\n \\n \\n
\\n
\\n
Debugging Navigation
\\n
This is a set of tools you can use to move around your code while debugging. You can step into, over, and out of your code, or simply press play to run the process until the next breakpoint.
\\n
\\n
\\n
\\n
Callstack
\\n
This is a structured list of information about the sequences of your code--basically, which functions are calling what, and where you are in the current process. It also stores local variables and function arguments, if present. You can use this feature to check how your code is running:
\\n
\\n
\\n
\\n
Interactive Mode
\\n
Lets you evaluate a piece of code, such as expressions or the values and properties of variables. The text field allows you to type any code you want, in case you discover a way to fix you problem:\\n
\\n
\\n
\\n
\\n
Variable Inspection
\\n
This shows all the related variables (including functions) that are present in the current context:\\n
\\n
\\n
\\n
\\n
Breakpoint List
\\n
At any point during your coding or debugging session, you can click on the gutter to apply a breakpoint: . When debugging your code, the process pauses at your established breakpoints, so that you can inspect closely what's going on in a certain part of the code. You can click on the breakpoint list to view all the breakpoints in your workspace. If you click on the checkbox, you can enable or disable a breakpoint as well. You can also click on a breakpoint in the gutter to disable or enable it.
\\n
\\n \\n
\\n
While debugging, you also have the power of the live inspector. While hovering over a piece of code in the editor, you'll instantly get some floating text that describes the values of that variable, similar to Variable Inspection.
While using Cloud9 IDE, you have access to the Python runtime. Accessing the command is no different than the way you'd use Python on your computer; just open the command line and type python. Currently, we run version 2.6.6.
\\n
To run a Python program that you've created, you can either:
\\n
\\n
Open the command line and type python, followed by the name of your program; for example python hello_world.py
\\n
Create a new run scenario, so that you can do things like pass in command line arguments
\\n
\\n
As a quick demonstration, open a new file, and paste this Python code into it:
\\n
#!/usr/bin/python\\n\\nprint\\\"Hello World!\\\";
\\n
When you hit the button in the menu bar, the console will print out Hello World!.
\\n
Note:
Currently, you can't debug Python applications, but we are working on adding this feature.
\\n\\n
\\n \\n \"\n },\n {\n \"filename\": \"writing_a_go_app\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Writing a Go App\",\n \"contents\": \"\\n \\n
Writing a Go App
\\n
Cloud9 IDE doesn't provide out-of-the-box support for the Go language, but with \\na few quick steps you can set up Cloud9 to build and run apps in Go!
\\n
Create a new workspace
\\n
First, create a new Custom workspace and call it whatever you want:
\\n
\\n
After your new workspace is created, click the "start editing" button. At the \\nbottom of your workspace you will see the Terminal. If you prefer to have it\\nfullscreen, you can launch a terminal tab by pressing Alt-T, or from the menu: \\nView>Terminals>New Terminal.
\\n
From the terminal you can install & setup everything on the underlying virtual \\nenvironment that every workspace is provided with.
\\n
Download Go
\\n
When you first enter your Terminal, you will be in your workspace root folder, \\nwhich is a number such as ~/562166. Make a note of this directory name, as \\nyou'll need it later.
\\n
Let's use your home directory to download the Go distribution; to get there, \\nsimply enter the following in the Terminal:
\\n
cd ..
\\n
To download the Go distribution enter the following:
at the time of writing the latest version was 1.1.1, but you might want to \\nuse a new version if it has become available. \\n\\n
\\n
After the download is complete, extract the archive:
\\n
tar -xzf go1.1.1.linux-amd64.tar.gz
\\n
Once the extraction is done, you will notice a new go directory in your home \\ndirectory. Feel free to delete the archive file you downloaded.
\\n
Set up your environment
\\n
The last step is to configure the environment so it can see the Go distribution \\nas well as our workspace Go files. To do this, edit your bash configuration \\nin the Terminal using vim (or emacs, nano, any simple editor will do):
Many times your app returns errors which are hard to understand and even harder to resolve. This is where the Terminal Monitor comes in.\\nThe following video gives a quick overview of the features and how the Terminal Monitor helps you write better apps.
\\n\\n\\n
If you would like to propose additions or help which Terminal Monitor should provide, please send a message to support@c9.io
While using Cloud9 IDE, you have access to the Ruby runtime. Accessing the command is no different than the way you'd use Ruby on your computer; just open the command line and type ruby. Currently, the default version is 1.9.3.
\\n
To run a Ruby program that you've created, you can either:
\\n
\\n
Open the command line and type ruby, followed by the name of your program; for example ruby hello_world.rb
\\n
Create a new run scenario, so that you can do things like pass in command line arguments
\\n
\\n
As a quick demonstration, open a new file, and paste this Ruby code into it:
\\n
#!/usr/bin/ruby\\n\\nputs 'Hello world'
\\n
When you hit the button in the menu bar, the console will print out Hello world.
\\n
Note:
Currently, you can't debug Ruby applications, but we are working on adding this feature.\\n\\n
\\n
RVM Support
\\n
We have rudimentary support for rvm, that allows you only to switch between versions 1.8.7 and 1.9.3. We don't support rvm per-project or global gemsets.
\\n \\n \"\n },\n {\n \"filename\": \"creating_new_workspace\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Creating a New Workspace\",\n \"contents\": \"\\n \\n
Creating a New Workspace
\\n
Cloud9 supports three types of workspaces:
\\n\\n
Hosted
\\n
FTP
\\n
SSH
\\n\\n
In this article, we'll walk you through the creation of a new workspace and describe the choices you encounter.
\\n
The first step for creating a new workspace is click the "CREATE NEW WORKSPACE" button in your Dashboard:
\\n
\\n
At this point, you'll encounter two choices: Create a new workspace and Clone from URL. Here's what they mean:
\\n
\\n
Create a New Workspace allows you to create any of the previously mentioned types of workspaces (hosted, FTP, or SSH).
\\n
Clone from URL allows you to instantly create a workspace from a repository, like GitHub or Bitbucket, using its URL. We'll explain more about this in the section below.
\\n
\\n
Create a New Workspace
\\n
After clicking on Create a new workspace, you're taken to the screen below:
\\n
\\n
First, let's enter a workspace name.\\nDepending on whether you have a Free of Premium account, you can choose to make it either Public (open to anyone with the URL), or Private (only accessible to you and people you share it with).
\\n
After this, choose the type of workspace you want to create:
\\n
\\n
Hosted: This is a regular Cloud9 workspace, powered by a full Ubuntu environment. You even have sudo powers! This is the best choice for most people, and we've included some more info about it below.
SSH, also called the "bring your own server" feature, lets you log into a server you own and run Cloud9 from there
\\n
\\n
Make a choice for the type of workspace and press Create. That's it! You can now see your new workspace in the dashboard:
\\n
\\n
Now, just click Start Editing to get started!
\\n
Hosted workspaces
\\n
Choose this workspace type to start from scratch with a 'Custom' workspace, or simply pick a pre-configured environment like Node.js, WordPress, or Python/Django, and immediately start developing your app.\\nThis way you don't need to spend valuable development time on system setup and maintenance, as we maintain it, and you control it.
\\n
\\n
As it's powered by a full Linux Ubuntu environment, hosted workspaces allow you to install any package (sudo apt-get install package), run git commands from the console to push your changes to a GitHub repo or a Bitbucket git repo, etcetera.
\\n
Cloning from a URL
\\n
The second option for creating a new workspace is to clone one from URL. The URL would be, for example, the URL of a GitHub workspace.
\\n
In fact, let's clone a workspace. When you click on Clone from URL, you're taken to this screen:
If you have a premium account, you can choose who has access to your workspace. For regular users, the new workspace will be public.
\\n
Now, check out the workspace. It will be created under My Workspaces. You can now start editing it!
\\n
Deleting a Workspace
\\n
Now that you know how to create a workspace, you should also learn how to delete one. Look at the far right side of your dashboard:
\\n
\\n
Clicking on the Delete button prompts the IDE to ask for confirmation:
\\n
This is your last chance to change your mind. Once you have typed delete in the textbox and pressed the red button, your workspace will be gone forever from Cloud9. If you are sure you want to delete your workspace, go ahead and press the red button. Of course, if your workspace is hosted elsewhere, like on another git or FTP server, it still exists in those repositories.
\\n\\n
\\n \\n \"\n },\n {\n \"filename\": \"ftp_workspaces\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Setting up an FTP project\",\n \"contents\": \"\\n
Setting up an FTP project
\\n
\\n\\n
\\n\\n
In this article, we'll show you how to set up an FTP project.
\\n
Note:
Currently, Cloud9 IDE only supports passive FTP. Active FTP, SFTP and FTPS are not yet supported. For SSH connections, consider creating an SSH workspace.\\n\\n
\\n
To create an FTP project, go to the Dashboard and click on the next to MY PROJECTS. Choose the option to Create a new project (see "Creating a New Project" if you need to review the steps to create a new project):
\\n
In the pop-up window that appears, select FTP for the project type:
\\n
\\n
Let's review the options available for your FTP project:
\\n
\\n
Hostname: the domain name or IP address of the machine running your FTP server.
\\n
Username: your username for the FTP server.
\\n
Password: your password for the FTP server.
\\n
Initial path: this is an optional parameter. You can set it as an absolute (starts with /) path. Otherwise, it'll be set to a relative path, and Cloud9 assumes that you want to start from the folder your FTP server leaves you after login (home or default folder).
\\n
\\n
Warning:
Be careful not to put an initial path that leaves you in a location where you don't have write privileges as that could cause problems.\\n\\n
\\n
Fill in your FTP details and click the Login Test to verify that the settings are correct. If the test succeeds, go ahead and click Create to create your FTP project. You'll then see your project in the Dashboard under My Projects:
\\n
\\n
When your new FTP project is selected, you will see three buttons: Start Editing, FTP settings, and Delete (on the far right). FTP settings gives you access to the settings you just filled in, as well as the login test. This is useful to use in case your login credentials have changed.
\\n
To get started with your FTP project, click on the Start Editing button. You'll be taken to the editor. Under Project Files, you should see the files from the FTP server in the directory you selected (either your home/default folder or the location indicated by the Initial Path, if you set it). The editor for FTP projects works the same as in other projects: you can create and edit your files in the usual way. The main difference is the FTP log at the bottom of the page (where the console is usually located for other non-FTP projects).
\\n
The FTP log displays output related to the interaction with the FTP server. The screenshot below, for example, shows what happens when we create a new file called TestFile.txt. The file is created in the FTP server and when I write to it, the contents are transferred.
\\n
\\n
Note:
In an FTP project, all files are stored on your FTP server; Cloud9 only stores the FTP settings. Please keep this in mind. Cloud9 IDE does not keep any copies of your files, so make sure you back them up properly. Any changes you make to these files in Cloud9 are automatically reflected on the live web server.
\\n\\n
\\n \\n \"\n },\n {\n \"filename\": \"writing_nodejs_hello_world\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Writing and Running a Node.js Program\",\n \"contents\": \"\\n \\n
Writing and Running a Node.js Program
\\n
Cloud9 IDE was built on top of the Node.js platform, and as such, you have full access to the node runtime. Currently, we support running both version v0.6.x and v0.8.x.
\\n
In this section, we'll walk you through the creation of a simple Hello World program. To get started, you'll first need to create a (GitHub or Mercurial) project. If you need a refresher on how to do this, please refer to Creating a New Workspace.
\\n
A Simple Node.js HTTP Server
\\n
Once you're in Cloud9, create a new file called server.js. Type the following code in the file:
This is a Node.js HTTP server. It returns a simple "Hello World" page every time you access the page. In short, you are creating an HTTP server with a callback function that is called for each request.
\\n
In the callback function, you create a response with a status code of 200 (indicating that the request was fulfilled successfully) and the message "Hello World". Finally, you specify which port and IP address the server runs on. When Cloud9 IDE runs servers, you set and retrieve the IP address and port number with the process.env.IP and process.env.PORT variables.
\\n
When you hit the button in the menu bar, the console will print out the following message:
\\n
To see your application in action, click on the link created for your project. You should see your "Hello World" application open up in a new browser tab: .
\\n
NVM Support
\\n
We have rudimentary support for nvm, that allows you only to switch between Node.js versions 0.6.21 and 0.8.x.
With Cloud9 IDE, you can run your PHP pages, without relying on a third-party system like Apache hosting. We run PHP version 5.3.3.
\\n
You can choose to run PHP scripts via the command line, by typing php, followed by the name of your PHP file. However, this is not a very common use case. Most likely, you'll be running your own server and hosting PHP files.
\\n
Here's a simple demonstration. First, create a PHP file called hello_world.php, and paste this code into it:
You can configure your PHP installation by editing the php.ini located in the /home/ubuntu/workspace directory. Please note: in some cases php.ini is located somewhere else. Just create a simple PHP file running phpinfo() to find out where to look for php.ini.
\\n
Make sure to restart Apache after you have applied your changes
\\n
apachectl restart
\\n
Note:
Currently, you can't debug PHP applications yet, but we are working on adding this feature.\\n
\\n\\n
\\n \\n \"\n },\n {\n \"filename\": \"setting_up_bitbucket_workspace\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Setting Up a Bitbucket Workspace\",\n \"contents\": \"\\n \\n
Setting Up a Bitbucket Workspace
\\n
Bitbucket is a code-hosting services that offers both git and mercurial support. Projects can be listed as private or public, absolutely free. For more information on Bitbucket, visit https://bitbucket.org.
\\n
We have integrated Bitbucket into the IDE to enable you to easily work on your public and private repositories. The following article explains how you can activate your Bitbucket account in Cloud9 IDE.
\\n
Bitbucket Activation
\\n
You can manage your add-on services from your user profile that you can find in the dashboard. When you have just signed in, click Your Account on the top of the left-side panel. Here, you can change the settings of your account. At the bottom, you'll see a list of add-on services that are integrated into Cloud9 IDE. Click activate on the Bitbucket button:
\\n
\\n
A new window will pop-up on your screen. This window asks you to give authorization permission for the Cloud9 IDE application to interact in various ways with Bitbucket:
\\n
\\n
To finalize the activation, click on Allow. Next, you're redirected to your account page, where you'll notice that your Bitbucket account is activated. You can deactivate Bitbucket by simply clicking deactivate, which may be useful when you want to link your Bitbucket account to another Cloud9 account.
\\n
Now that you have activated Bitbucket, you can start to create and manage your projects!
\\n
Managing Projects
\\n
There are several ways to manage Bitbucket projects in Cloud9 IDE:
\\n
\\n
By creating a new git or mercurial project and pushing it to Bitbucket
\\n
By cloning a Bitbucket project from a URL
\\n
By bringing in a Bitbucket project manually
\\n
\\n
Creating a New Git Project
\\n
New projects are created from the dashboard. In the left-side panel, click on the to add a new project:
\\n
\\n
A new window will pop-up in which you can change your settings to your preferences:
\\n
\\n
Fill in your preferred project name in the text field
\\n
Choose who will have access to the project (a feature for Premium customers)
\\n
Select your project type (git, mercurial, or FTP)
\\n
Choose a development server (a feature for Premium customers)
\\n
\\n
\\n
After you click CREATE, the project is listed in your dashboard. Select the project to see its Project Profile, where you can start editing:
\\n
There are a couple of things you should do first, before you can use all of git's power. First, you'll want to add a remote to the project. From the Cloud9 IDE command line, you can execute the following commands:
\\n
git remote add [remote name] [remote url]
\\n
remote url is the location of the project on Bitbucket; for example 'origin git@bitbucket.org:username/repository_name.git'. You'll have to create a Bitbucket project first in order to generate this URL. Adding a remote URL lets you freely push and pull your project.
\\n
Next, create a few new files inside your project. By default, you should already have a README.md. You can add these files to git with the following command:
\\n
git add [file1, file2, file3, ...]
\\n
Finally, create a commit that you can push to your remote:
\\n
git commit -m 'added new files'
\\n
Don't forget to push this commit out to Bitbucket:
\\n
git push [remote name] master
\\n
Ta-da! Your project is developed on Cloud9, and stored in Bitbucket.
\\n
Cloning Projects from a URL
\\n
You can also create a project in Cloud9 IDE by cloning it from a URL. Once again, click on the , and select Clone from URL. A new window pops up, asking you:
\\n
\\n
to enter a Source URL
\\n
to choose who will have access to the project (Premium feature)
\\n
to choose a development server (Premium feature)
\\n
\\n
\\n
You can find an examples of a Bitbucket URL on any of their repo description pages:
\\n
\\n
Paste the URL in the source field and click CHECKOUT. In the left-side panel, you'll see the project and its status turn into "Cloning in Progress". When this process is completed you can open the project and start editing it, just like any other project.
\\n
Clone Projects Already On Bitbucket
\\n
When you provide Cloud9 IDE with your Bitbucket credentials, it provides a list of projects you haven't yet imported into the editor:
\\n
\\n
From this list, clicking on a project and selecting CLONE TO EDIT brings the repo into the IDE, just as if you cloned it from a URL.
\\n\\n
\\n \\n \"\n },\n {\n \"filename\": \"run_your_own_workspace\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Running Your Own SSH Workspace\",\n \"contents\": \"\\n \\n
Running Your Own SSH Workspace
\\n
You have access to an incredibly powerful feature of Cloud9 that we like to call "running your own workspace."
\\n
If you own a server that you can SSH into, you can log into that machine with Cloud9 and work on your projects remotely. To put this into perspective, you could have an entire toolchain set up on this machine--say, make with gcc, or ant with Java--edit the files with Cloud9 IDE, and build your toolchain via the IDE's terminal. Here's a video demonstrating how you could instantly compile a C program using an SSH workspace and Cloud9:
\\n
\\n\\n
\\n\\n
Connection Prerequisites
\\n
In order to connect Cloud9 with a server you own, you'll need two things:
\\n\\n
Node.js installed on the server. This version must be between Node.js version 0.6.16 and the latest 0.8.x.
\\n
Your public SSH key must be saved on the server at ~/.ssh/authorized_keys. This is to ensure the utmost security between your client computer and the machine you're attempting to access. Cloud9 provides you with your SSH key in the workspace dialog; it is up to you to save it to the appropriate path. For more information on SSH keys, see this article.
\\n\\n
Tip:
If you're behind a firewall, you can identify which IP address and port Cloud9 is running on by typing echo $OPENSHIFT_INTERNAL_IP and echo $OPENSHIFT_INTERNAL_PORT into the console. You can use this information to open any blocked connections.\\n\\n
\\n
Creating an SSH Workspace
\\n
Once you've got those requirements set up, here's how you can create an SSH workspace of your own:
\\n
In the Projects tab on the Dashboard, click on the next to MY PROJECTS and choose the option to Create a new project (see "Creating a New Project" if you need to review the steps to create a new project):
\\n
In the pop-up window that appears, select SSH for the project type:
\\n
You don't need to fill out every option provided by the dialog. Let's review what they are:
\\n
\\n
Hostname: the domain name or IP address of the machine running your SSH server.
\\n
Username: your username for the SSH server.
\\n
Node.js Binary Path: the locaton of your Node.js binary. If you're not sure where it is, you can always let Cloud9 guess it for you. Otherwise, on your server, type which node, to see the full path
\\n
Initial path: this is an optional parameter. You can set it as an absolute (starts with /) path. Otherwise, it'll be set to a relative path, and Cloud9 assumes that you want to start from the folder your SSH server leaves you after login (usually the home or default folder).
\\n
Port: this is an optional parameter. Cloud9 will automatically try to connect on port 22
\\n
\\n
Warning:
Be careful not to put an initial path that leaves you in a location where you don't have write privileges, as that could cause problems!\\n\\n
\\n
Fill in your SSH details and click the Login Test to verify that the settings are correct. If the test succeeds, go ahead and click Create to create your SSH connection. You'll then see your project in the Dashboard under My Projects:\\n
\\n
When your new SSH is selected, you will see three buttons: Start Editing, SSH settings, and Delete (on the far right). SSH settings gives you access to the settings you just filled in, as well as the login test. This is useful to use in case your login credentials have changed.
\\n
Warning:
Make sure that you copied your SSH key correctly! Trailing spaces are significant, so make sure your text editor on your server is not modifying the key that Cloud9 is providing you with.\\n\\n
\\n
To get started with your SSH project, click on the Start Editing button. You'll instantly be taken to the editor, and have full access to your server's resources. As you can see in the video above, this means you can do exciting things like compiling C programs.
To connect Cloud9 to a server via SSH, we first need to install a few dependencies on your system. \\nThis is done by an open-source installer which you can find here.
\\n
Usually the installation should succeed without any issues, but on some systems you will need to install a few dependencies manually. See below for common dependency issues you might run into.
\\n
Installing Python 2.7 on CentOS
\\n
curl -O https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz\\ntar xf Python-2.7.6.tar.xz\\ncd Python-2.7.6\\n./configure --prefix=/usr/local\\nmake && make altinstall
\\n
Common errors
\\n
no configure: error: "curses not found"
\\n
To get around this issue make sure glibc-static is installed on the machine.
\\n\\n
\\n \\n \"\n },\n {\n \"filename\": \"setting_up_github_workspace\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Setting Up a GitHub Workspace\",\n \"contents\": \"\\n \\n
Setting Up a GitHub Workspace
\\n
GitHub is a code hosting service which offers you a lot of features to manage your public and private git repositories. For more information about GitHub and how to use it, visit https://github.com.
\\n
We have integrated GitHub into the IDE to enable you to easily work on your public and private Git repositories. The following article explains how you can activate your GitHub account in Cloud9 IDE.
\\n
GitHub Activation
\\n
You can manage your add-on services from your user profile that you can find in the dashboard. When you have just signed in, click Your Account on the top of the left-side panel. Here, you can change the settings of your account. At the bottom, you'll see a list of add-on services that are integrated into Cloud9 IDE. Click activate on the GitHub button:
\\n
\\n
A new window will pop-up on your screen. This window asks you to give authorization permission for the Cloud9 IDE application to interact in various ways with GitHub:
\\n
\\n
To finalize the activation, click on Allow. Next, you're redirected to your account page, where you'll notice that your GitHub account is activated. You can deactivate GitHub by simply clicking deactivate, which may be useful when you want to link your GitHub account to another Cloud9 account.
\\n
Now that you have activated GitHub, you can start to create and manage git projects!
\\n
Managing Git Projects
\\n
There are several ways to manage GitHub projects in Cloud9 IDE:
\\n
\\n
By creating a new git project and pushing it to GitHub
\\n
By cloning a GitHub project from a URL
\\n
By bringing in a GitHub project manually
\\n
\\n
Creating a New Git Project
\\n
New projects are created from the dashboard. In the left-side panel, click on the to add a new project:
\\n
\\n
A new window will pop-up in which you can change your settings to your preferences:
\\n
\\n
Fill in your preferred project name in the text field
\\n
Choose who will have access to the project (a feature for Premium customers)
\\n
Select your project type (git, mercurial, or FTP)
\\n
Choose a development server (a feature for Premium customers)\\n{: #setupOptions}
\\n
\\n
\\n
Select git as your project type. After you click CREATE, the project is listed in your dashboard. Select the project to see its Project Profile, where you can start editing:
\\n
There are a couple of things you should do first, before you can use all of git's power. First, you'll want to add a remote to the project. From the Cloud9 IDE command line, you can execute the following commands:
\\n
git remote add [remote name] [remote url]
\\n
remote url is the location of the project on GitHub; for example 'git@github.com:/ajaxorg/node_chat'. You'll have to create a GitHub project first in order to generate this URL. Adding a remote URL lets you freely push and pull your project.
\\n
Next, create a few new files inside your project. By default, you should already have a README.md. You can add these files to git with the following command:
\\n
git add [file1, file2, file3, ...]
\\n
Finally, create a commit that you can push to your remote:
\\n
git commit -m 'added new files'
\\n
Don't forget to push this commit out to GitHub:
\\n
git push [remote name] master
\\n
Ta-da! Your project is developed on Cloud9, and stored in GitHub.
\\n
Cloning Projects from a URL
\\n
You can also create a project in Cloud9 IDE by cloning it from a URL. Once again, click on the , and select Clone from URL. A new window pops up, asking you:
\\n
\\n
to enter a Source URL
\\n
to choose who will have access to the project (Premium feature)
\\n
to choose a development server (Premium feature) {: #cloningOptions}
\\n
\\n
\\n
You can find an examples of a GitHub URL on any of their repo description pages:
\\n
\\n
Paste the URL in the source field and click CHECKOUT. In the left-side panel, you'll see the project and its status turn into "Cloning in Progress". When this process is completed you can open the project and start editing it, just like any other project.
\\n
Clone Projects Already On GitHub
\\n
When you provide Cloud9 IDE with your GitHub credentials, it provides a list of projects you haven't yet imported into the editor:
\\n
\\n
From this list, clicking on a project and selecting CLONE TO EDIT brings the repo into the IDE, just as if you cloned it from a URL.
\\n\\n
\\n \\n \"\n },\n {\n \"filename\": \"setting_up_gitlab_workspace\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Setting Up a GitLab workspace\",\n \"contents\": \"\\n
Setting Up a GitLab workspace
\\n
GitLab is open source Git management software used by more than 25.000 \\norganizations, see http://gitlab.org/.
MySQL is the world's most widely used open source relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases.
\n
MySQL's most common features
\n
\n
A broad subset of ANSI SQL 99, as well as extensions
Cloud9 IDE does not support installing a MySQL database (yet). As a workaround you can choose to connect your project to a MySQL database hosted elsewhere. Xeround\noffers hosted MySQL instances and have a free tier available for getting started.
\n
Xeround
\n\n
Register with Xeround
\n
Log in to your controlpanel
\n
Choose 'create new'
\n
Choose a datacenter
\n
Enter your Database name, Username and Password and create
\n
Select your newly created instance and click the 'External DNS Hostname' link provided to log into PHPMyAdmin
\n
Create and import/setup your database
\n\n
Cloud9
\n\n
Log into your account
\n
Create a new project (or use an existing one)
\n
Test the connection using the following script:
\n
<?php\n\n $database = new mysqli('instanceNo.db.xeround.com', 'username', 'password', 'databasename', 'port');\n\n if($database->connect_errno > 0){\n die ('Database Error' . $database->connect_error); \n }else{\n die ('Connected!');\n }\n ?>
this article is outdated, a new version will follow soon\n\n
\n
The project bar is located towards the left of the Cloud9 IDE:
\n
The buttons in the project bar allow you to reveal and hide panels for the IDE. In more detail:
\n
\n
Pressing on the Cloud9 icon collapses the panel area
\n
Project Files shows your workspace's directory structure. You can view all your files here. Right-clicking within this panel reveals a drop-down menu with additional options, such as the ability to rename files or create new directories.
\n
Active Files lists your files that are currently open.
this article is outdated, a new version will follow soon\n\n
\n
Cloud9 IDE offers advanced tab features to make working with multiple files easy. By right-clicking on any tab, you'll open up the tab context menu:
\n
\n
These feature include:
\n
\n
Reveal in File Tree: opens the current file in the Project Files tree
\n
Close Tab: closes the current tab
\n
Close All Tabs: closes all the opened files
\n
Close All But Current Tab: closes all the opened files, except the current one
\n
Close Tabs to the Right/Left: closes all opened tabs to the right (or left) of the current one
\n
File Revision History...: launches the revisions panel
\n
\n
To the left of the tab menu is another button that offers additional functions for tab navigation:
\n
Tab Sessions
\n
\n\n
\n\n
Tab sessions is a unique feature that is useful when dealing with projects that involve juggling between many tabs. Essentially, tab sessions lets you save the current state of the tabs. You can close your workspace, switch to a different branch, and instantly reload your previously opened files. You'll no longer need to work with opening and closing multiple files.
\n
To use tab sessions, select Save Tab Sessions from the tab button menu. Give it a unique name. When you're ready to restore your tab sessions, just select Load Tab Sessions.
\n
If you find that you've got too many tab sessions defined, you can always choose to delete them from the same tab menu.
The status bar is designed to provide you with all sorts of information about your code--and additional functionality--without getting in the way of the IDE. It's quite tiny, and quite powerful, like a weight-lifting squirrel.
\n
You can find the status bar in the lower-right corner of the editor: . Keep in mind that the status bar is transparent, so it's able to camoflauge well with light or dark themes.
\n
There's three pieces of crucial information available at all times: your current row, your current column, and, if you're highlighting characters, the status bar displays the number of bytes currently selected. If you're using Vim Mode, the status bar also tells you if you're in INSERT mode.
\n
If you click on the status bar, it expands into a menu that provides a smaller set of the full IDE preferences. These options only deal with the IDE editor:
\n
\n \n
\n
Preference Name
\n
Description
\n
\n \n \n
Show Invisibles
\n
Shows invisibles characters in the editor, like tabs and line breaks
\n
\n
\n
Wraps Lines
\n
Wraps lines according to the line margin defined, or your browser's window. Otherwise, lines run off the current viewport.
\n
\n
\n
Code Folding
\n
When enabled, allows you to show or hide "blocks" of code
\n
\n
\n
Full Line Selection
\n
When highlighting lines, this option will highlight all ending whitespace, until the end of the editor window
\n
\n
\n
Highlight Active Line
\n
Presents a darker shade in the code editor to indicate which line you're currently on
\n
\n
\n
Show Indent Guides
\n
Shows the indent guides in the editor, letting you see your code's nestings
\n
\n
\n
Show Gutter
\n
Shows the gutter in the editor, which indicates line numbers, warnings, and errors
\n
\n
\n
Highlight Selected Word
\n
If you highlight a word, this highlights all matching words in the editor
\n
\n
\n
Auto-pair Quotes, Brackets, etc.
\n
When enabled, typing ", (, or [ will actually make two characters appear. In addition, whenever you highlight a word and type one of these characters, it is surrounded by that character (e.g. words becomes "words")
\n
\n
\n
Auto-hide Horizontal Scrollbar
\n
hen this is enabled, this will hide the horizontal scroll bar in the editor. Note that this has no effect in Mac OS X 10.7 (Lion) and above, since all scrollbars, by default, auto-hide.
\n
\n
\n
Font Size
\n
Changes the font size of the code in the editor
\n
\n
\n
Show Print Margin
\n
Shows (and defines) the number of characters possible in line, before it wraps
MySQL is the world's most widely used open source relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases.
\n
MySQL's most common features
\n
\n
A broad subset of ANSI SQL 99, as well as extensions
This article explains our first iteration of MySQL support in Cloud9. It makes it super easy to install, start and stop a MySQL instance right in your workspace. The nice thing is that every workspace will run a separate database so your projects will never interfere with each other. You can control MySQL with the mysql-ctl command line tool run from the terminal:
\n
# start MySQL. Will create an empty database on first start\n$ mysql-ctl start\n\n# stop MySQL\n$ mysql-ctl stop\n\n# run the MySQL interactive shell\n$ mysql-ctl cli
\n
You can then connect to the database with following parameters:
\n
\n \n
\n
Option\n
Value\n
Comment\n
\n \n \n
\n
Hostname
\n
$IP
\n
The same local IP as the application you run on Cloud9
\n
\n
\n
Port
\n
3306
\n
The default MySQL port number
\n
\n
\n
User
\n
$C9_USER
\n
Your Cloud9 user name
\n
\n
\n
Password
\n
-
\n
No password since you can only access the DB from within the workspace
\n
\n
\n
Database
\n
c9
\n
The database name
\n
\n \n
\n
Importing data into your database
\n
To import existing data into your database run following commands:
\n
mysql-ctl cli
\n
You are now in the MySQL environment and can start the import:
\n
mysql> use c9\nmysql> source PATH_TO_SQL_FILE.sql
\n
To verify that everything got imported run:
\n
mysql> show tables;
\n
Note:
MySQL socket file can be found in ~/lib/mysql/socket/mysql.sock\n\n
Sometimes you run into issues when you run your project. Here you will find the most common issues and how to solve them.
\n
Address in use or similar
\n
The most common reason for an error thrown by your app stating that a port or address is in use is the fact that some process is already running/listening on that port/address. You need to take a look for those and kill the processes conflicting with your app:
\n
// Find the process\nlsof -i tcp:$PORT
\n
If any relevant process is running you will get a list looking like this:
MongoDB is a scalable, high-performance, open source NoSQL database.
\n
MongoDB's most common features
\n
\n
Document-Oriented Storage \nJSON-style documents with dynamic schemas offer simplicity and power.
\n
\n
Full Index Support \nIndex on any attribute, just like you're used to.
\n
\n
Querying \nRich, document-based queries.
\n
\n
\n
In addition, MongoDB has many scalability features such as:
\n
Replication, Auto-sharding, Map/Reduce and GridFS
\n
Running MongoDB on a Cloud9 workspace
\n
MongoDB is preinstalled in your workspace. To run MongoDB, run the following below (passing the correct parameters to it). Mongodb data will be stored in the folder data.
You can start mongodb by running the mongod script on your project root: \n$ ./mongod
\n
MongoDB parameters used:
\n
| Parameter | Description |\n| ------------------------------ | ----------------------------------------------------------------------------------------------- |\n| --dbpath=data | Because it defaults to /var/db which isn't accessible) |\n| --nojournal | Because mongodb usually pre-allocates 2 GB journal file (which exceeds Cloud9 disk space quota) |\n| --bind_ip=$IP | Because you can't bind to 0.0.0.0) |\n| --rest | Runs on default port 28017 |
\n
Drivers
\n
You should use the host $IP instead of localhost as your driver connection url. \ne.g. in Node, it is: process.env.IP
\n
MongoDB has drivers for all supported runtimes. Following are the most commonly used drivers:
For this tutorial, we'll show you how to create and run a CoffeeScript project, entirely within the Cloud9 IDE. To run any coffeescript project, you'll need to first make sure to install the coffeescript module via the Node Package Manager (npm). We're going to walk you through how to do that with a sample project.
\n
First, create a new project. Then, in the console, enter the following command:
This is a sample CoffeeScript application written by one of our developers. After cloning the project, you'll find three different files in the project tree: server.js, app.coffee, and README.md.
\n
The README.md file contains instructions to install coffee-script using npm. We've integrated Node Package Manager into Cloud9 IDE to enable users to install Node programs. Thus, from the Cloud9 IDE command line, type the following command to install the Coffeescript module:
\n
npm install coffee-script
\n
Next, let's have a look at the server.js file. The first line is the require() function, which is used to load the coffee-script module that you have just installed. On the second line, we declare the CoffeeScript file that contains your application. In the last line, we specify the port the server is listening to. When projects run within Cloud9 IDE, you must retrieve the port information using process.env.PORT.
\n
Now, let's look at what the CoffeeScript file does. It creates an HTTP server with a function that is called for each request. In the callback function, you create a response with a status code of 200 (indicating that the request was fulfilled successfully) and the message "Hello World". You use module.exports to enable the server.js file to use the code in the CoffeeScript file:
Did you know that you can use Cloud9 IDE to work on your WordPress website? It's true, and incredibly easy. You can't edit your posts on WordPress using Cloud9, since they are stored in a database on your server. But you can edit pretty much every other aspect of your site.
\n
To start, you'll need to create a new FTP project. After that, enter your wp-content folder, find the theme you're using on your website, and start editing its style.
\n
Thanks to the preview button in the menu bar, you can also witness your changes as they happen, before committing them to your server.
Since Cloud9 IDE is built on top of Node.js, we also leverage the module system NPM. In Cloud9, you can install any npm package either locally or globally. Note that due to security restrictions, modules installed globally can only be used in the project they were installed from. In other words, while you have access to any command line tools installed by the module, they are bound to the project, not your username. We run version 1.1.24 of npm.
\n
To demonstrate the power of NPM, we'll build and run a quick express server:
\n\n
Launch the command line by hitting Shift-Escape. You can also go to View>Command Line if it's not visible.
\n
Type npm install express, and wait for the npm install process to complete.
\n
Create a new JavaScript file, and paste the following code:
\n\n
var express = require('express'),\n app = express();\n\napp.use(express.logger());\n\napp.get('/', function(req, res){\n res.send('Hello World');\n});\n\napp.listen(process.env.PORT);\nconsole.log('Express server started on port %s', process.env.PORT);
\n
To launch your express server, click on the button in the menu bar.
Cloud9 supports the installation of Python packages for applications that need to go beyond the standard library set. Every workspace has version 0.6.10 of Python's easy_install package manager. For more information on this module, see the official easy_install documentation.
\n
Let's try installing a package. First, type the following in the console:
\n
easy_install markdown
\n
This installs the markdown Python package to your workspace. You won't see the package installed in the directory tree, because it's kept deep within your project's the Python libs.
\n
Next, create a new Python script, and add these lines of code:
\n
import markdown\n\nhtml = markdown.markdown(\"# HELLO THERE!\")\n\nprint html
\n
After clicking run, the console will correctly print out <h1>HELLO THERE!</h1>.
\n
You have access to all of the functionality easy_install provides you. For example, you can open up the Python REPL and type the following to see a list of your installed packages:
SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world. The source code for SQLite is in the public domain.
\n
Note:
SQLite supports full text search and ACID transactions (atomic, consistent, isolated, and durable)\nWith its simplicity and zero-configuration, SQLite is a popular choice for new applications.\n\n
\n
Getting started
\n
You can open the terminal and create a database in a file db_test.db as follows:
\n
\n
Try yourself
\n
$ sqlite3 db_test.db\nSQLite version 3.6.20\nEnter \".help\" for instructions\nEnter SQL statements terminated with a \";\"\nsqlite> create table tbl1(one varchar(10), two smallint);\nsqlite> insert into tbl1 values('hello!',10);\nsqlite> insert into tbl1 values('goodbye', 20);\nsqlite> select * from tbl1;\nhello!|10\ngoodbye|20\nsqlite> CREATE TABLE tbl2 (\n ...> f1 varchar(30) primary key,\n ...> f2 text,\n ...> f3 real\n ...> );\nsqlite> .exit
\n
To get to know sqlite commands, use the command: .help.
Cloud9 supports the installation of Ruby gems in your workspace using the RubyGems package manager. The current installed RubyGems version is 1.3.7. For more information on the gem command, see the official RubyGems documentation.
\n
Let's try installing a gem. First, type the following in the console:
\n
gem install progressbar
\n
This installs the progressbar Ruby gem to your workspace. You won't see the gem installed in the directory tree, because it's kept deep within your project's the Ruby libs.
\n
Next, create a new Ruby script, and add these lines of code:
\n
require'progressbar'\n\nbar = ProgressBar.new(\"Example progress\", 50)\ntotal = 0\nuntil total >= 100\n sleep(rand(2)/2.0)\n increment = (rand(6) + 3)\n bar.inc(increment)\n total += increment\nend
\n
After clicking run, the console will start printing out an ASCII progressbar.
\n
You have access to all of the functionality gem provides you. For example, you can open up the console and type gem query to see a list of your installed gems.
Cloud9 IDE provides several ways to run and debug your code. We'll explore each of them in this section of the documentation.
\n
Note:
Currently, only Javascript/Node.js applications can make use of the debugger. You can also execute Javascript/Node.js, Python, Ruby, and Apache+PHP applications.\n\n
\n
The following information applies to all of the above programming languages.
\n
Running Code
\n
Running your code in Cloud9 is really easy. First, open the file you want to run. Usually, this file is going to be the main entry point to your app; for example, if you're creating a server, you'd want to run the file that actually instantiates that server.
\n
There are two ways to run your code: either through the Run Panel, or through the run button in the menu bar.
\n
Using the Run Panel
\n
Next, click on the Run button in the project bar. You'll notice immediately that your active file is already available to run. Just double-click on the file, and you'll launch your app.
\n
When you're ready to stop your app, click on the button in the menu bar at any time.
\n
At the bottom of the run panel, you'll notice a few more options you can set. Filling these textboxes out creates a run scenario, which is like setting up some configurations for the way your code runs. These options are:
\n
\n
Name the name of your run scenario
\n
File Path: the location of your running file in your project
\n
Runtime: defines how you want your code to be run. Typically, you'd set different runtime versions here.
\n
Cmd Line Args: allows you to provide any additional command line arguments you want to pass to your app
\n
\n
Of course, you can also save your run scenarios; just click on the add button at the top of the panel. When you're ready to run a scenario, click on its name in the Run panel list. To remove a run scenario, click on its name in the run panel list, and then click on the remove button.
\n
Using the Run Button
\n
The run button in the menu bar acts as a sort of short cut to the Run panel. When clicked, the button automatically runs the currently active file. If you have a list of run scenarios already defined, the run button also presents a list of those:
\n
\n
Run in debug mode indicates that you want to run the current code through the debugger. Auto show & hide debug tools will reveal (or collapse) the debugging tools panel described below. You can also work with this presentation by going to View>Panels, and configuring the debugger there.
\n
Console Output
\n
Every time you run a project, the console expands to reveal output from your program. If you're launching a server, Cloud9 provides you with a URL to access the project. Otherwise, any statements sent by your application's print statements (like console.log() for Javascript, print for Python, or puts for Ruby) are also shown here. For example:
\n
Debugging Your Code
\n
Setting up a project to debug is done in very much the same way as running your code. The only difference is that you must click on the run settings icon in the Run panel and select Run in debug mode. Similarly, you can select Run in debug mode from the run button.
\n
Initially, the only difference this will make is the expansion of the debugging toolbar to the right of the editor:
\n
This toolbar, however, grants you the following capabilities:
\n
\n \n
\n
Toolbar Icon
\n
Debugging Function
\n
Description
\n
\n \n \n
\n
\n
Debugging Navigation
\n
This is a set of tools you can use to move around your code while debugging. You can step into, over, and out of your code, or simply press play to run the process until the next breakpoint.
\n
\n
\n
\n
Callstack
\n
This is a structured list of information about the sequences of your code--basically, which functions are calling what, and where you are in the current process. It also stores local variables and function arguments, if present. You can use this feature to check how your code is running:
\n
\n
\n
\n
Interactive Mode
\n
Lets you evaluate a piece of code, such as expressions or the values and properties of variables. The text field allows you to type any code you want, in case you discover a way to fix you problem:\n
\n
\n
\n
\n
Variable Inspection
\n
This shows all the related variables (including functions) that are present in the current context:\n
\n
\n
\n
\n
Breakpoint List
\n
At any point during your coding or debugging session, you can click on the gutter to apply a breakpoint: . When debugging your code, the process pauses at your established breakpoints, so that you can inspect closely what's going on in a certain part of the code. You can click on the breakpoint list to view all the breakpoints in your workspace. If you click on the checkbox, you can enable or disable a breakpoint as well. You can also click on a breakpoint in the gutter to disable or enable it.
\n
\n \n
\n
While debugging, you also have the power of the live inspector. While hovering over a piece of code in the editor, you'll instantly get some floating text that describes the values of that variable, similar to Variable Inspection.
While using Cloud9 IDE, you have access to the Python runtime. Accessing the command is no different than the way you'd use Python on your computer; just open the command line and type python. Currently, we run version 2.6.6.
\n
To run a Python program that you've created, you can either:
\n
\n
Open the command line and type python, followed by the name of your program; for example python hello_world.py
\n
Create a new run scenario, so that you can do things like pass in command line arguments
\n
\n
As a quick demonstration, open a new file, and paste this Python code into it:
\n
#!/usr/bin/python\n\nprint\"Hello World!\";
\n
When you hit the button in the menu bar, the console will print out Hello World!.
\n
Note:
Currently, you can't debug Python applications, but we are working on adding this feature.
\n\n
"
- },
- {
- "filename": "writing_a_go_app",
- "mtime": 1412172002000,
- "pageTitle": "Writing a Go App",
- "contents": "
Writing a Go App
\n
Cloud9 IDE doesn't provide out-of-the-box support for the Go language, but with \na few quick steps you can set up Cloud9 to build and run apps in Go!
\n
Create a new workspace
\n
First, create a new Custom workspace and call it whatever you want:
\n
\n
After your new workspace is created, click the "start editing" button. At the \nbottom of your workspace you will see the Terminal. If you prefer to have it\nfullscreen, you can launch a terminal tab by pressing Alt-T, or from the menu: \nView>Terminals>New Terminal.
\n
From the terminal you can install & setup everything on the underlying virtual \nenvironment that every workspace is provided with.
\n
Download Go
\n
When you first enter your Terminal, you will be in your workspace root folder, \nwhich is a number such as ~/562166. Make a note of this directory name, as \nyou'll need it later.
\n
Let's use your home directory to download the Go distribution; to get there, \nsimply enter the following in the Terminal:
\n
cd ..
\n
To download the Go distribution enter the following:
at the time of writing the latest version was 1.1.1, but you might want to \nuse a new version if it has become available. \n\n
\n
After the download is complete, extract the archive:
\n
tar -xzf go1.1.1.linux-amd64.tar.gz
\n
Once the extraction is done, you will notice a new go directory in your home \ndirectory. Feel free to delete the archive file you downloaded.
\n
Set up your environment
\n
The last step is to configure the environment so it can see the Go distribution \nas well as our workspace Go files. To do this, edit your bash configuration \nin the Terminal using vim (or emacs, nano, any simple editor will do):
Many times your app returns errors which are hard to understand and even harder to resolve. This is where the Terminal Monitor comes in.\nThe following video gives a quick overview of the features and how the Terminal Monitor helps you write better apps.
\n\n\n
If you would like to propose additions or help which Terminal Monitor should provide, please send a message to support@c9.io
While using Cloud9 IDE, you have access to the Ruby runtime. Accessing the command is no different than the way you'd use Ruby on your computer; just open the command line and type ruby. Currently, the default version is 1.9.3.
\n
To run a Ruby program that you've created, you can either:
\n
\n
Open the command line and type ruby, followed by the name of your program; for example ruby hello_world.rb
\n
Create a new run scenario, so that you can do things like pass in command line arguments
\n
\n
As a quick demonstration, open a new file, and paste this Ruby code into it:
\n
#!/usr/bin/ruby\n\nputs 'Hello world'
\n
When you hit the button in the menu bar, the console will print out Hello world.
\n
Note:
Currently, you can't debug Ruby applications, but we are working on adding this feature.\n\n
\n
RVM Support
\n
We have rudimentary support for rvm, that allows you only to switch between versions 1.8.7 and 1.9.3. We don't support rvm per-project or global gemsets.
"
- },
- {
- "filename": "creating_new_workspace",
- "mtime": 1412172002000,
- "pageTitle": "Creating a New Workspace",
- "contents": "
Creating a New Workspace
\n
Cloud9 supports three types of workspaces:
\n\n
Hosted
\n
FTP
\n
SSH
\n\n
In this article, we'll walk you through the creation of a new workspace and describe the choices you encounter.
\n
The first step for creating a new workspace is click the "CREATE NEW WORKSPACE" button in your Dashboard:
\n
\n
At this point, you'll encounter two choices: Create a new workspace and Clone from URL. Here's what they mean:
\n
\n
Create a New Workspace allows you to create any of the previously mentioned types of workspaces (hosted, FTP, or SSH).
\n
Clone from URL allows you to instantly create a workspace from a repository, like GitHub or Bitbucket, using its URL. We'll explain more about this in the section below.
\n
\n
Create a New Workspace
\n
After clicking on Create a new workspace, you're taken to the screen below:
\n
\n
First, let's enter a workspace name.\nDepending on whether you have a Free of Premium account, you can choose to make it either Public (open to anyone with the URL), or Private (only accessible to you and people you share it with).
\n
After this, choose the type of workspace you want to create:
\n
\n
Hosted: This is a regular Cloud9 workspace, powered by a full Ubuntu environment. You even have sudo powers! This is the best choice for most people, and we've included some more info about it below.
SSH, also called the "bring your own server" feature, lets you log into a server you own and run Cloud9 from there
\n
\n
Make a choice for the type of workspace and press Create. That's it! You can now see your new workspace in the dashboard:
\n
\n
Now, just click Start Editing to get started!
\n
Hosted workspaces
\n
Choose this workspace type to start from scratch with a 'Custom' workspace, or simply pick a pre-configured environment like Node.js, WordPress, or Python/Django, and immediately start developing your app.\nThis way you don't need to spend valuable development time on system setup and maintenance, as we maintain it, and you control it.
\n
\n
As it's powered by a full Linux Ubuntu environment, hosted workspaces allow you to install any package (sudo apt-get install package), run git commands from the console to push your changes to a GitHub repo or a Bitbucket git repo, etcetera.
\n
Cloning from a URL
\n
The second option for creating a new workspace is to clone one from URL. The URL would be, for example, the URL of a GitHub workspace.
\n
In fact, let's clone a workspace. When you click on Clone from URL, you're taken to this screen:
If you have a premium account, you can choose who has access to your workspace. For regular users, the new workspace will be public.
\n
Now, check out the workspace. It will be created under My Workspaces. You can now start editing it!
\n
Deleting a Workspace
\n
Now that you know how to create a workspace, you should also learn how to delete one. Look at the far right side of your dashboard:
\n
\n
Clicking on the Delete button prompts the IDE to ask for confirmation:
\n
This is your last chance to change your mind. Once you have typed delete in the textbox and pressed the red button, your workspace will be gone forever from Cloud9. If you are sure you want to delete your workspace, go ahead and press the red button. Of course, if your workspace is hosted elsewhere, like on another git or FTP server, it still exists in those repositories.
In this article, we'll show you how to set up an FTP project.
\n
Note:
Currently, Cloud9 IDE only supports passive FTP. Active FTP, SFTP and FTPS are not yet supported. For SSH connections, consider creating an SSH workspace.\n\n
\n
To create an FTP project, go to the Dashboard and click on the next to MY PROJECTS. Choose the option to Create a new project (see "Creating a New Project" if you need to review the steps to create a new project):
\n
In the pop-up window that appears, select FTP for the project type:
\n
\n
Let's review the options available for your FTP project:
\n
\n
Hostname: the domain name or IP address of the machine running your FTP server.
\n
Username: your username for the FTP server.
\n
Password: your password for the FTP server.
\n
Initial path: this is an optional parameter. You can set it as an absolute (starts with /) path. Otherwise, it'll be set to a relative path, and Cloud9 assumes that you want to start from the folder your FTP server leaves you after login (home or default folder).
\n
\n
Warning:
Be careful not to put an initial path that leaves you in a location where you don't have write privileges as that could cause problems.\n\n
\n
Fill in your FTP details and click the Login Test to verify that the settings are correct. If the test succeeds, go ahead and click Create to create your FTP project. You'll then see your project in the Dashboard under My Projects:
\n
\n
When your new FTP project is selected, you will see three buttons: Start Editing, FTP settings, and Delete (on the far right). FTP settings gives you access to the settings you just filled in, as well as the login test. This is useful to use in case your login credentials have changed.
\n
To get started with your FTP project, click on the Start Editing button. You'll be taken to the editor. Under Project Files, you should see the files from the FTP server in the directory you selected (either your home/default folder or the location indicated by the Initial Path, if you set it). The editor for FTP projects works the same as in other projects: you can create and edit your files in the usual way. The main difference is the FTP log at the bottom of the page (where the console is usually located for other non-FTP projects).
\n
The FTP log displays output related to the interaction with the FTP server. The screenshot below, for example, shows what happens when we create a new file called TestFile.txt. The file is created in the FTP server and when I write to it, the contents are transferred.
\n
\n
Note:
In an FTP project, all files are stored on your FTP server; Cloud9 only stores the FTP settings. Please keep this in mind. Cloud9 IDE does not keep any copies of your files, so make sure you back them up properly. Any changes you make to these files in Cloud9 are automatically reflected on the live web server.
Cloud9 IDE was built on top of the Node.js platform, and as such, you have full access to the node runtime. Currently, we support running both version v0.6.x and v0.8.x.
\n
In this section, we'll walk you through the creation of a simple Hello World program. To get started, you'll first need to create a (GitHub or Mercurial) project. If you need a refresher on how to do this, please refer to Creating a New Workspace.
\n
A Simple Node.js HTTP Server
\n
Once you're in Cloud9, create a new file called server.js. Type the following code in the file:
This is a Node.js HTTP server. It returns a simple "Hello World" page every time you access the page. In short, you are creating an HTTP server with a callback function that is called for each request.
\n
In the callback function, you create a response with a status code of 200 (indicating that the request was fulfilled successfully) and the message "Hello World". Finally, you specify which port and IP address the server runs on. When Cloud9 IDE runs servers, you set and retrieve the IP address and port number with the process.env.IP and process.env.PORT variables.
\n
When you hit the button in the menu bar, the console will print out the following message:
\n
To see your application in action, click on the link created for your project. You should see your "Hello World" application open up in a new browser tab: .
\n
NVM Support
\n
We have rudimentary support for nvm, that allows you only to switch between Node.js versions 0.6.21 and 0.8.x.
With Cloud9 IDE, you can run your PHP pages, without relying on a third-party system like Apache hosting. We run PHP version 5.3.3.
\n
You can choose to run PHP scripts via the command line, by typing php, followed by the name of your PHP file. However, this is not a very common use case. Most likely, you'll be running your own server and hosting PHP files.
\n
Here's a simple demonstration. First, create a PHP file called hello_world.php, and paste this code into it:
You can configure your PHP installation by editing the php.ini located in the /home/ubuntu/workspace directory. Please note: in some cases php.ini is located somewhere else. Just create a simple PHP file running phpinfo() to find out where to look for php.ini.
\n
Make sure to restart Apache after you have applied your changes
\n
apachectl restart
\n
Note:
Currently, you can't debug PHP applications yet, but we are working on adding this feature.\n
Bitbucket is a code-hosting services that offers both git and mercurial support. Projects can be listed as private or public, absolutely free. For more information on Bitbucket, visit https://bitbucket.org.
\n
We have integrated Bitbucket into the IDE to enable you to easily work on your public and private repositories. The following article explains how you can activate your Bitbucket account in Cloud9 IDE.
\n
Bitbucket Activation
\n
You can manage your add-on services from your user profile that you can find in the dashboard. When you have just signed in, click Your Account on the top of the left-side panel. Here, you can change the settings of your account. At the bottom, you'll see a list of add-on services that are integrated into Cloud9 IDE. Click activate on the Bitbucket button:
\n
\n
A new window will pop-up on your screen. This window asks you to give authorization permission for the Cloud9 IDE application to interact in various ways with Bitbucket:
\n
\n
To finalize the activation, click on Allow. Next, you're redirected to your account page, where you'll notice that your Bitbucket account is activated. You can deactivate Bitbucket by simply clicking deactivate, which may be useful when you want to link your Bitbucket account to another Cloud9 account.
\n
Now that you have activated Bitbucket, you can start to create and manage your projects!
\n
Managing Projects
\n
There are several ways to manage Bitbucket projects in Cloud9 IDE:
\n
\n
By creating a new git or mercurial project and pushing it to Bitbucket
\n
By cloning a Bitbucket project from a URL
\n
By bringing in a Bitbucket project manually
\n
\n
Creating a New Git Project
\n
New projects are created from the dashboard. In the left-side panel, click on the to add a new project:
\n
\n
A new window will pop-up in which you can change your settings to your preferences:
\n
\n
Fill in your preferred project name in the text field
\n
Choose who will have access to the project (a feature for Premium customers)
\n
Select your project type (git, mercurial, or FTP)
\n
Choose a development server (a feature for Premium customers)
\n
\n
\n
After you click CREATE, the project is listed in your dashboard. Select the project to see its Project Profile, where you can start editing:
\n
There are a couple of things you should do first, before you can use all of git's power. First, you'll want to add a remote to the project. From the Cloud9 IDE command line, you can execute the following commands:
\n
git remote add [remote name] [remote url]
\n
remote url is the location of the project on Bitbucket; for example 'origin git@bitbucket.org:username/repository_name.git'. You'll have to create a Bitbucket project first in order to generate this URL. Adding a remote URL lets you freely push and pull your project.
\n
Next, create a few new files inside your project. By default, you should already have a README.md. You can add these files to git with the following command:
\n
git add [file1, file2, file3, ...]
\n
Finally, create a commit that you can push to your remote:
\n
git commit -m 'added new files'
\n
Don't forget to push this commit out to Bitbucket:
\n
git push [remote name] master
\n
Ta-da! Your project is developed on Cloud9, and stored in Bitbucket.
\n
Cloning Projects from a URL
\n
You can also create a project in Cloud9 IDE by cloning it from a URL. Once again, click on the , and select Clone from URL. A new window pops up, asking you:
\n
\n
to enter a Source URL
\n
to choose who will have access to the project (Premium feature)
\n
to choose a development server (Premium feature)
\n
\n
\n
You can find an examples of a Bitbucket URL on any of their repo description pages:
\n
\n
Paste the URL in the source field and click CHECKOUT. In the left-side panel, you'll see the project and its status turn into "Cloning in Progress". When this process is completed you can open the project and start editing it, just like any other project.
\n
Clone Projects Already On Bitbucket
\n
When you provide Cloud9 IDE with your Bitbucket credentials, it provides a list of projects you haven't yet imported into the editor:
\n
\n
From this list, clicking on a project and selecting CLONE TO EDIT brings the repo into the IDE, just as if you cloned it from a URL.
You have access to an incredibly powerful feature of Cloud9 that we like to call "running your own workspace."
\n
If you own a server that you can SSH into, you can log into that machine with Cloud9 and work on your projects remotely. To put this into perspective, you could have an entire toolchain set up on this machine--say, make with gcc, or ant with Java--edit the files with Cloud9 IDE, and build your toolchain via the IDE's terminal. Here's a video demonstrating how you could instantly compile a C program using an SSH workspace and Cloud9:
\n
\n\n
\n\n
Connection Prerequisites
\n
In order to connect Cloud9 with a server you own, you'll need two things:
\n\n
Node.js installed on the server. This version must be between Node.js version 0.6.16 and the latest 0.8.x.
\n
Your public SSH key must be saved on the server at ~/.ssh/authorized_keys. This is to ensure the utmost security between your client computer and the machine you're attempting to access. Cloud9 provides you with your SSH key in the workspace dialog; it is up to you to save it to the appropriate path. For more information on SSH keys, see this article.
\n\n
Tip:
If you're behind a firewall, you can identify which IP address and port Cloud9 is running on by typing echo $OPENSHIFT_INTERNAL_IP and echo $OPENSHIFT_INTERNAL_PORT into the console. You can use this information to open any blocked connections.\n\n
\n
Creating an SSH Workspace
\n
Once you've got those requirements set up, here's how you can create an SSH workspace of your own:
\n
In the Projects tab on the Dashboard, click on the next to MY PROJECTS and choose the option to Create a new project (see "Creating a New Project" if you need to review the steps to create a new project):
\n
In the pop-up window that appears, select SSH for the project type:
\n
You don't need to fill out every option provided by the dialog. Let's review what they are:
\n
\n
Hostname: the domain name or IP address of the machine running your SSH server.
\n
Username: your username for the SSH server.
\n
Node.js Binary Path: the locaton of your Node.js binary. If you're not sure where it is, you can always let Cloud9 guess it for you. Otherwise, on your server, type which node, to see the full path
\n
Initial path: this is an optional parameter. You can set it as an absolute (starts with /) path. Otherwise, it'll be set to a relative path, and Cloud9 assumes that you want to start from the folder your SSH server leaves you after login (usually the home or default folder).
\n
Port: this is an optional parameter. Cloud9 will automatically try to connect on port 22
\n
\n
Warning:
Be careful not to put an initial path that leaves you in a location where you don't have write privileges, as that could cause problems!\n\n
\n
Fill in your SSH details and click the Login Test to verify that the settings are correct. If the test succeeds, go ahead and click Create to create your SSH connection. You'll then see your project in the Dashboard under My Projects:\n
\n
When your new SSH is selected, you will see three buttons: Start Editing, SSH settings, and Delete (on the far right). SSH settings gives you access to the settings you just filled in, as well as the login test. This is useful to use in case your login credentials have changed.
\n
Warning:
Make sure that you copied your SSH key correctly! Trailing spaces are significant, so make sure your text editor on your server is not modifying the key that Cloud9 is providing you with.\n\n
\n
To get started with your SSH project, click on the Start Editing button. You'll instantly be taken to the editor, and have full access to your server's resources. As you can see in the video above, this means you can do exciting things like compiling C programs.
To connect Cloud9 to a server via SSH, we first need to install a few dependencies on your system. \nThis is done by an open-source installer which you can find here.
\n
Usually the installation should succeed without any issues, but on some systems you will need to install a few dependencies manually. See below for common dependency issues you might run into.
\n
Installing Python 2.7 on CentOS
\n
curl -O https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz\ntar xf Python-2.7.6.tar.xz\ncd Python-2.7.6\n./configure --prefix=/usr/local\nmake && make altinstall
\n
Common errors
\n
no configure: error: "curses not found"
\n
To get around this issue make sure glibc-static is installed on the machine.
GitHub is a code hosting service which offers you a lot of features to manage your public and private git repositories. For more information about GitHub and how to use it, visit https://github.com.
\n
We have integrated GitHub into the IDE to enable you to easily work on your public and private Git repositories. The following article explains how you can activate your GitHub account in Cloud9 IDE.
\n
GitHub Activation
\n
You can manage your add-on services from your user profile that you can find in the dashboard. When you have just signed in, click Your Account on the top of the left-side panel. Here, you can change the settings of your account. At the bottom, you'll see a list of add-on services that are integrated into Cloud9 IDE. Click activate on the GitHub button:
\n
\n
A new window will pop-up on your screen. This window asks you to give authorization permission for the Cloud9 IDE application to interact in various ways with GitHub:
\n
\n
To finalize the activation, click on Allow. Next, you're redirected to your account page, where you'll notice that your GitHub account is activated. You can deactivate GitHub by simply clicking deactivate, which may be useful when you want to link your GitHub account to another Cloud9 account.
\n
Now that you have activated GitHub, you can start to create and manage git projects!
\n
Managing Git Projects
\n
There are several ways to manage GitHub projects in Cloud9 IDE:
\n
\n
By creating a new git project and pushing it to GitHub
\n
By cloning a GitHub project from a URL
\n
By bringing in a GitHub project manually
\n
\n
Creating a New Git Project
\n
New projects are created from the dashboard. In the left-side panel, click on the to add a new project:
\n
\n
A new window will pop-up in which you can change your settings to your preferences:
\n
\n
Fill in your preferred project name in the text field
\n
Choose who will have access to the project (a feature for Premium customers)
\n
Select your project type (git, mercurial, or FTP)
\n
Choose a development server (a feature for Premium customers)\n{: #setupOptions}
\n
\n
\n
Select git as your project type. After you click CREATE, the project is listed in your dashboard. Select the project to see its Project Profile, where you can start editing:
\n
There are a couple of things you should do first, before you can use all of git's power. First, you'll want to add a remote to the project. From the Cloud9 IDE command line, you can execute the following commands:
\n
git remote add [remote name] [remote url]
\n
remote url is the location of the project on GitHub; for example 'git@github.com:/ajaxorg/node_chat'. You'll have to create a GitHub project first in order to generate this URL. Adding a remote URL lets you freely push and pull your project.
\n
Next, create a few new files inside your project. By default, you should already have a README.md. You can add these files to git with the following command:
\n
git add [file1, file2, file3, ...]
\n
Finally, create a commit that you can push to your remote:
\n
git commit -m 'added new files'
\n
Don't forget to push this commit out to GitHub:
\n
git push [remote name] master
\n
Ta-da! Your project is developed on Cloud9, and stored in GitHub.
\n
Cloning Projects from a URL
\n
You can also create a project in Cloud9 IDE by cloning it from a URL. Once again, click on the , and select Clone from URL. A new window pops up, asking you:
\n
\n
to enter a Source URL
\n
to choose who will have access to the project (Premium feature)
\n
to choose a development server (Premium feature) {: #cloningOptions}
\n
\n
\n
You can find an examples of a GitHub URL on any of their repo description pages:
\n
\n
Paste the URL in the source field and click CHECKOUT. In the left-side panel, you'll see the project and its status turn into "Cloning in Progress". When this process is completed you can open the project and start editing it, just like any other project.
\n
Clone Projects Already On GitHub
\n
When you provide Cloud9 IDE with your GitHub credentials, it provides a list of projects you haven't yet imported into the editor:
\n
\n
From this list, clicking on a project and selecting CLONE TO EDIT brings the repo into the IDE, just as if you cloned it from a URL.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
Collaboration
-
Note:
this article is outdated, a new version will follow soon
-
-
-
Collaboration with Cloud9 IDE is an amazing feature that lets you do more than just share your projects with any other Cloud9 developer. You can grant someone else access to change files in your workspace, in realtime--or just let them view the workspace without any other rights. While you're collaborating, you can discuss the code through a built-in chat room.
-
To invite someone to collaborate on a project with you, simply copy the URL in the browser and send it to a friend. You can also click on Share in the menu bar to get quick access to other ways to share, such as via e-mail, Twitter, or Facebook.
-
Let's take a look at some of the additional features available while you collaborate.
-
Members List
-
There are two terms used for people accessing your project: members and visitors. Members are individuals that have read and write access to your project--that means they can change any code; visitors only have read access. The Members panel lists all the collaborators in a project, both active and inactive:
-
-
If you are the owner of a project, you can click on anyone's username to grant (or revoke) write access:
-
-
If you're worried about the sanctity of your code after grant access to other developers, fear not. You can always take a look at a file revision history to view line-by-line changes made to your project over time.
-
Chatting
-
Any member or visitor can participate in group chat with each other. Developers can also choose to double-click on a person's username and engage in a private, instant-message-style conversation.
-
Collaborate on Code
-
When a collaborator changes a file you're also working on, Cloud9 detects it and asks you whether you'd like to use their changes, or your version. We're also simply giving you the option to merge both, using a three-way-merge algorithm to handle any conflicts. This is the same algorithm used by version control systems like git for merging branches.
-
To make the experience even smoother you can choose "Always merge by default" and we'll never interrupt you about file changes again.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Color Picker
-
Note:
this feature is deprecated
-
-
-
-
-
-
-
The color picker is an awesome feature in Cloud9 IDE, designed to not only make color selections easier, but also, more harmonious. At its core, the color picker is a way to represent words (red, blue, e.t.c.), RGBA values (rgba(175, 3, 124, .6)), or hex values (#f00f00) into actual colors.
-
To enable the color picker, flip the preferences on in the Settings panel. You can use the color picker in CSS, SVG, HTML, or APF Skin files. All you have to do is hover over the value of a color definition, and it'll instantly highlight, like this:
-
When the represented color is highlighted, click on it. You'll get a color square defining all the possible color arrangements. To select a color, you can click in the square, pick your own RGB or HSB values, or enter some hex code. Best of all, at the bottom of the window, you'll find a list of other colors found within the same document--just in case you want to achieve matching shades:
-
To set the value, just click anywhere outside of the color picker.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/common_errors.html b/out/common_errors.html
deleted file mode 100644
index 096c211..0000000
--- a/out/common_errors.html
+++ /dev/null
@@ -1,220 +0,0 @@
-
-
-
-
-
- Common errors | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
Common errors
-
Sometimes you run into issues when you run your project. Here you will find the most common issues and how to solve them.
-
Address in use or similar
-
The most common reason for an error thrown by your app stating that a port or address is in use is the fact that some process is already running/listening on that port/address. You need to take a look for those and kill the processes conflicting with your app:
-
// Find the process
-lsof -i tcp:$PORT
-
If any relevant process is running you will get a list looking like this:
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
The Console
-
Note:
this feature is deprecated
-
-
-
The Console is at the bottom of the IDE. It's where you can enter command line input, view output from your program, and push and pull your files between your code repositories.
-
Note:
The Console contains a full-fledged terminal, which provides you with a TTY interface for direct access to the machine that Cloud9 is running on.
-
-
-
Available Commands
-
The terminal can perform all Unix commands, and allows for path autocompletion by hitting Tab.
-
For instance, you can use mercurial commands (hg) and git commands (git) to communicate with the system, and to push your code between repositories. Typing hg or git shows the complete list of commands that are available for these services. For more information about these commands, please check their respective documentation:
To use mercurial commands on the project you are working on, you must have a mercurial project set up; the same holds true for git. Follow these links to learn more about how to set up these project in Cloud9:
The output tab in the Console shows information whenever a user is running or debugging a program. The content is similar to the output of a desktop terminal:
-
The output tab also displays the error and additional information that can improve your coding quality. You can use the Console to output results from your running application, just like a regular terminal.
-
As your process runs, you'll see a message similar to this one indicating that Cloud9 is running something in the background:
-
If you hover over this message, you can opt to cancel the process by clicking on the button:
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Create a Workspace
-
Cloud9 supports three types of workspaces:
-
-
Hosted
-
FTP
-
SSH
-
-
"Hosted" is the best choice for most people, so in this short "Getting Started" article we'll only describe this option; for other options please read the full Creating a new workspace article.
-
The first step for creating a new workspace is click the "CREATE NEW WORKSPACE" button in your Dashboard:
-
-
At this point, you'll encounter two choices: Create a new workspace and Clone from URL.
-In this article we'll only describe the Create a New Workspace option, which allows you to create any of the previously mentioned types of workspaces (hosted, FTP, or SSH).
-
After clicking on Create a new workspace, you're taken to the screen below:
-
-
First, let's enter a workspace name.
-Depending on whether you have a Free of Premium account, you can choose to make it either Public (open to anyone with the URL), or Private (only accessible to you and people you share it with).
-
After this, choose the type of workspace you want to create:
-
-
Hosted: This is a regular Cloud9 workspace, powered by a full Ubuntu environment. You even have sudo powers!
SSH, also called the "bring your own server" feature, lets you log into a server you own and run Cloud9 from there
-
-
Choose the "Hosted" workspace type to start from scratch with a 'Custom' workspace, or simply pick a pre-configured environment like Node.js, WordPress, or Python/Django, and immediately start developing your app.
-This way you don't need to spend valuable development time on system setup and maintenance, as we maintain it, and you control it.
-
-
As it's powered by a full Linux Ubuntu environment, hosted workspaces allow you to install any package (sudo apt-get install package), run git commands from the console to push your changes to a GitHub repo or a Bitbucket git repo, etcetera.
-
Now press Create. That's it! You can now see your new workspace in the dashboard:
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Create a CoffeeScript Project
-
For this tutorial, we'll show you how to create and run a CoffeeScript project, entirely within the Cloud9 IDE. To run any coffeescript project, you'll need to first make sure to install the coffeescript module via the Node Package Manager (npm). We're going to walk you through how to do that with a sample project.
-
First, create a new project. Then, in the console, enter the following command:
This is a sample CoffeeScript application written by one of our developers. After cloning the project, you'll find three different files in the project tree: server.js, app.coffee, and README.md.
-
The README.md file contains instructions to install coffee-script using npm. We've integrated Node Package Manager into Cloud9 IDE to enable users to install Node programs. Thus, from the Cloud9 IDE command line, type the following command to install the Coffeescript module:
-
npm install coffee-script
-
Next, let's have a look at the server.js file. The first line is the require() function, which is used to load the coffee-script module that you have just installed. On the second line, we declare the CoffeeScript file that contains your application. In the last line, we specify the port the server is listening to. When projects run within Cloud9 IDE, you must retrieve the port information using process.env.PORT.
-
Now, let's look at what the CoffeeScript file does. It creates an HTTP server with a function that is called for each request. In the callback function, you create a response with a status code of 200 (indicating that the request was fulfilled successfully) and the message "Hello World". You use module.exports to enable the server.js file to use the code in the CoffeeScript file:
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
Creating a New Workspace
-
Cloud9 supports three types of workspaces:
-
-
Hosted
-
FTP
-
SSH
-
-
In this article, we'll walk you through the creation of a new workspace and describe the choices you encounter.
-
The first step for creating a new workspace is click the "CREATE NEW WORKSPACE" button in your Dashboard:
-
-
At this point, you'll encounter two choices: Create a new workspace and Clone from URL. Here's what they mean:
-
-
Create a New Workspace allows you to create any of the previously mentioned types of workspaces (hosted, FTP, or SSH).
-
Clone from URL allows you to instantly create a workspace from a repository, like GitHub or Bitbucket, using its URL. We'll explain more about this in the section below.
-
-
Create a New Workspace
-
After clicking on Create a new workspace, you're taken to the screen below:
-
-
First, let's enter a workspace name.
-Depending on whether you have a Free of Premium account, you can choose to make it either Public (open to anyone with the URL), or Private (only accessible to you and people you share it with).
-
After this, choose the type of workspace you want to create:
-
-
Hosted: This is a regular Cloud9 workspace, powered by a full Ubuntu environment. You even have sudo powers! This is the best choice for most people, and we've included some more info about it below.
SSH, also called the "bring your own server" feature, lets you log into a server you own and run Cloud9 from there
-
-
Make a choice for the type of workspace and press Create. That's it! You can now see your new workspace in the dashboard:
-
-
Now, just click Start Editing to get started!
-
Hosted workspaces
-
Choose this workspace type to start from scratch with a 'Custom' workspace, or simply pick a pre-configured environment like Node.js, WordPress, or Python/Django, and immediately start developing your app.
-This way you don't need to spend valuable development time on system setup and maintenance, as we maintain it, and you control it.
-
-
As it's powered by a full Linux Ubuntu environment, hosted workspaces allow you to install any package (sudo apt-get install package), run git commands from the console to push your changes to a GitHub repo or a Bitbucket git repo, etcetera.
-
Cloning from a URL
-
The second option for creating a new workspace is to clone one from URL. The URL would be, for example, the URL of a GitHub workspace.
-
In fact, let's clone a workspace. When you click on Clone from URL, you're taken to this screen:
If you have a premium account, you can choose who has access to your workspace. For regular users, the new workspace will be public.
-
Now, check out the workspace. It will be created under My Workspaces. You can now start editing it!
-
Deleting a Workspace
-
Now that you know how to create a workspace, you should also learn how to delete one. Look at the far right side of your dashboard:
-
-
Clicking on the Delete button prompts the IDE to ask for confirmation:
-
This is your last chance to change your mind. Once you have typed delete in the textbox and pressed the red button, your workspace will be gone forever from Cloud9. If you are sure you want to delete your workspace, go ahead and press the red button. Of course, if your workspace is hosted elsewhere, like on another git or FTP server, it still exists in those repositories.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
Custom Runners
-
Luckily you're not limited to the default set of Runners in Cloud9.
-You can simply define your own custom Runner, which is both simple and very powerful.
-All you need to do is create a Runner file.
-In this article we'll describe how to do this in just a few steps.
-
In the Run panel (usually at the bottom of the UI), click the 'Runner' text input and choose 'New Runner'.
-In the new Runner file that's now opened, you can configure your runner
-using a simple JSON format. We'll show a basic example below
-and then explain the different properties you can use.
-
Let's start with a basic example: a runner for go files.
This runner will use "go run" for any file that has a ".go" file extension.
-If you add it, it'll override our default Go runner.
-
As another example, let's save a new Node 0.11 configuration, including Harmony support.
-Create a new Runner, add this code, and save it as 'Node 0.11.x.run':
-
// This file overrides the built-in Node 0.11.x runner
-// For more information see http://docs.c9.io:8080/#!/api/run-method-run
-{
- "cmd": [
- "bash",
- "--login",
- "-c",
- "nvm use 0.11 > /dev/null; node --harmony ${debug?--nocrankshaft --nolazy --debug-brk=15454} '$file' $args"
- ],
- "debugger": "v8",
- "debugport": 15454,
- "info": "Your code is running at \\033[01;34m$url\\033[00m.\n\\033[01;31mImportant:\\033[00m use \\033[01;32mprocess.env.PORT\\033[00m as the port and \\033[01;32mprocess.env.IP\\033[00m as the host in your scripts!\n"
-}
-
Note:
alternatively, you can check 'Show Hidden Files' in your workspace directory tree (the small gear in the upper right corner), and create a new file in the '.c9/runners' folder called 'Node 0.11.x.run' with this code.
-
-
-
That's it! Your custom Runner should be available in the Run panel.
-
Runner Variables
-
Here's a list of all the variables you can use in your runners:
-
-
$file_path The directory of the current file, e. g., /home/ubuntu/workspace/docs
-
-
$file The full path to the current file, e. g., /home/ubuntu/workspace/docs/Chapter1.txt.
-
-
$args Any arguments entered after the file name.
-
-
$file_name The name portion of the current file, e. g., Chapter1.txt.
-
-
$file_extension The extension portion of the current file, e. g., txt.
-
-
$file_base_name The name only portion of the current file, e. g., Document.
-
-
$packages The full path to the Packages folder.
-
-
$project The full path to the current project file.
-
-
$project_path The directory of the current project file.
-
-
$project_name The name portion of the current project file.
-
-
$project_extension The extension portion of the current project file.
-
-
$project_base_name The name only portion of the current project file.
-
-
$hostname The hostname of the workspace.
-
-
$hostname_path The hostname of the workspace together with the relative path of the project file.
-
-
$url The full url to access the workspace.
-
-
$port The port assigned to the workspace.
-
-
$ip The ip address to run a process against in the workspace.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
The Dashboard
-
After you have logged into Cloud9, you are placed into your account's dashboard. From here, you can edit your profile and manage workspaces you have access to.
-
-
In the top-left corner of the dashboard, your username is displayed. Within the user context, you can view your user profile by clicking on Your Account:
-
-
The user profile contains:
-
-
Your recent activities, including a list of actions you have recently performed, such as cloning, opening, and deleting projects
-
Your add-on services, which you've integrated into Cloud9. Currently, these are GitHub and Bitbucket.
-
Your account settings, where you're given the following choices:
-
Change your password
-
Show your SSH key
-
Upgrade to premium (or, downgrade from it)
-
Delete your account
-
-
-
-
The gravatar that is used for your profile is handled by gravatar.com. If you don't have a gravatar yet, Cloud9 IDE uses an uninspiring default.
-
In the left panel, you'll find a list of various projects associated with your account. These are:
-
-
My Projects: these are projects you've created or cloned, and own
-
Shared With Me: these are projects shared with you by other Cloud9 users
-
Recently Visited: these are projects you've seen lately
-
Projects on GitHub: a list of your uncloned public and private GitHub projects
-
Projects on Bitbucket: a list of your uncloned public and private Bitbucket projects
You can always filter your project list by entering text in the text bar to find matching projects. If you need to update the list, click the refresh icon at the bottom of the panel:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/deploying_code.html b/out/deploying_code.html
deleted file mode 100644
index fb317fd..0000000
--- a/out/deploying_code.html
+++ /dev/null
@@ -1,231 +0,0 @@
-
-
-
-
-
- Deploying Your Code | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Deploying Your Code
-
Cloud9 IDE offers many different ways to get your code from your editor to your
-production server. To deploy your code, click on the Deploy button in the
-Project Bar:
-
-
We offer tight integration with the following environments:
Following these links will provide you with more information on code deployment.
-You can deploy your code to as many services and servers as you like. Keep in
-mind that you'll already need an account at those hosting providers before you
-can deploy your app to them!
-
If you're comfortable with the command line, you can also deploy to several more
-environments, such as:
Before you attempt to deploy your application, make sure that you have
-committed all your changes to version control. Cloud9 deploys for you whatever
-was last committed to version control.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/deploying_to_heroku.html b/out/deploying_to_heroku.html
deleted file mode 100644
index 73680d6..0000000
--- a/out/deploying_to_heroku.html
+++ /dev/null
@@ -1,227 +0,0 @@
-
-
-
-
-
- Deploying to Heroku | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Deploying to Heroku
-
This section will show you how to deploy your applications to Heroku, a cloud-based application platform. The integration with Cloud9 IDE makes your development process even more agile. If you don't have a Heroku account, visit their website to create one for free.
-
To get started, create a simple Node.js application. If you don't have one yet, you can follow our tutorial on developing one.
-
After you click on the Deploy button in the Project Bar, click the plus sign next to Deploy to add another deploy target. Choose Heroku as an option. After you have signed into your Heroku account, you can create a new deploy target or choose an existing one from your account:
-
-
Note:
Heroku only allows you to create names for your apps that contain letters and dashes.
-
-
-
Next, press Deploy to continue the process; the following window might appear:
-
-
Heroku Node.js apps are required to have a package.json file, much like with NPM. Cloud9 can generate a package.json file for you, containing metadata to share Heroku. The following lines represent what that file might looks like:
After you have a package.json file, you might see this dialog:
-
-
Sometimes, a Heroku app also requires a Procfile. The Procfile is needed to start the application in Heroku. You can just create a new file, add the line below, and save it as 'Procfile'. Don't add any file extensions.
-
web: node web.js
-
Try the deploy button again. The console will directly output the following when the deployment is completed:
-
-
And just like that, you've deployed your project to Heroku.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/deploying_to_windows_azure_sites.html b/out/deploying_to_windows_azure_sites.html
deleted file mode 100644
index 0218ae1..0000000
--- a/out/deploying_to_windows_azure_sites.html
+++ /dev/null
@@ -1,226 +0,0 @@
-
-
-
-
-
- Deploying to Windows Azure Sites | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Deploying to Windows Azure Sites
-
This article will show you how to deploy your applications to Windows Azure. If you don't have an account yet, the Windows Azure process will help you create one. Keep in mind that Windows Azure is not free, though it does come with a free trial. Windows Azure projects can be deployed from any operating system.
-
To get started, create a simple Node.js application. If you don't have one yet, you can follow our tutorial on developing one.
-
After you click on the Deploy button in the Project Bar, click the plus sign next to Deploy to add another deploy target. Choose Windows Azure as an option. You'll be prompted with this dialog:
-
You must click on the Download Windows Azure Settings button before you can continue. If you don't have a Windows Azure account, here is where you can create one. If you do have an account, your browser will automatically download the required file.
-
When that's finished, simply select the downloaded file from your computer, and upload it to Cloud9. You'll only have to do this process once. If you ever need to upload a new certificate, be sure to click Clear cert in the lower-right corner of this dialog.
-
After the file has uploaded, click on Create new to create a new hosted service. A hosted service is the container in which your application is hosted when it is deployed to Windows Azure. For more information, see Overview of Creating a Hosted Service for Windows Azure.
-
You can set a few configuration options such as the number of instances to use, its host OS, and where the data center is located. Selecting "Enable RDP" and providing a username and password enables remote desktop for your deployment.
-
Your new Windows Azure server will appear in the Deploy list:
-
Go ahead and click on DEPLOY. If this is the first time you're trying to deploy this project to Windows Azure, you'll receive three prompts:
-
-
A dialog will inform you of a missing web.config file. If you click Yes, Cloud9 will create a file called Web.cloud.config in your project. This file contains configuration information about your app.
-
-
You'll be told about a missing csdef file. If you click Yes, Cloud9 will create a file called ServiceDefinition.csdef in your project. ServiceDefinition.csdef is a Windows Azure-specific files necessary for publishing your application For more information, see Overview of Creating a Hosted Service for Windows Azure.
-
-
You'll be asked to select the instance size for this application. For this tutorial, just select Small, and then click Create. For more details about Windows Azure VM sizes, see How to Configure Virtual Machine Sizes.
-
-
-
Your app will now deploy to a Windows Azure server! You can follow its progress in the Deploy panel, or by watching the messages in the console:
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
Deploying via the Command Line
-
In the new version of Cloud9 we don't have support for deployment from the UI yet, but we're going to add those features soon.
-
Until then, you can manually install various command-line tools into your workspace and deploy using the command line.
-It should go without saying that this is for super 31337 developers that aren't afraid of the command line.
-
Below is a list of some of the services we have tested and support deploying to.
-All the commands need to be executed in the terminal unless stated otherwise.
-
Heroku
-
Heroku's toolbelt is installed by default in new VMs.
-
Now, you can use the heroku command for your projects, as described in the
-Heroku documentation.
-
If deploying to Heroku, you should probably be using a local instance of PostgresQL, or you may run into problems caused by different database interpretations of SQL.
To deploy to Azure sites from the command line, open the Terminal and type:
-
cd ~/lib/azure-sites
-npm install
-
Then, add the bin to your workspace's path:
-
PATH=$PATH:$HOME/lib/azure-sites/bin
-
Now, you can use the azure command in the terminal.
-
Windows Azure Cloud Services
-
For free and premium plans, follow the instructions on the
-azure-cmdlet-node repository. This
-project is maintained by Cloud9.
-
Google App Engine
-
First, setup Push to Deploy: Create a new App Engine application at
-cloud.google.com/console, and then enable
-Push-to-Deploy under 'App Engine' in the Application Settings page. Leave this
-tab open to note the URL for your repo.
-
Secondly, configure Cloud9. Run the following commands (making sure to replace
-your email address, auth-token, and repo-url):
The email in this case is the mail address you use to login to your Google
-App Engine account and the password is the auth-token generated from the admin
-console, it is not your google password, never type that into a third party tool.
-'REPO' is the repository URL generated before.
-
-
-
Finally, do a commit, and a push:
-
git commit -a -m "First commit"
-git push appengine master
-
OpenShift
-
# Install rhc:
-gem install rhc
-rhc setup
-
-# After this you can use rhc to manage your account:
-
-# list apps:
-rhc apps
-# To show what you can do with apps do:
-rhc app help
-# You deploy via a git push
-git push <giturl> master
-
CloudFoundry
-
To deploy to CloudFoundry from the command line in the Console
-or a Terminal, type:
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Editing Remote WordPress Websites via FTP
-
-
-
-
-
Did you know that you can use Cloud9 IDE to work on your WordPress website? It's true, and incredibly easy. You can't edit your posts on WordPress using Cloud9, since they are stored in a database on your server. But you can edit pretty much every other aspect of your site.
-
To start, you'll need to create a new FTP project. After that, enter your wp-content folder, find the theme you're using on your website, and start editing its style.
-
Thanks to the preview button in the menu bar, you can also witness your changes as they happen, before committing them to your server.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/faq_general.html b/out/faq_general.html
deleted file mode 100644
index 7d48954..0000000
--- a/out/faq_general.html
+++ /dev/null
@@ -1,251 +0,0 @@
-
-
-
-
-
- FAQ: General | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
FAQ: General
-
Can I use FTP workspaces on Cloud9?
-
Yes, Cloud9 supports FTP workspaces that allow you to edit your files directly on your FTP server.
-Currently FTP workspaces still open in the old version of Cloud9, but soon we'll also support FTP workspaces with the new version of Cloud9.
-
One thing that was removed for reliability reasons in the new version of Cloud9, is the ability to deploy over FTP from a regular workspace.
-We're bringing back those features in a new format and with much higher reliability in the coming months.
No, this is not supported by our hosting platform. It does currently allow access to the GMail servers though, so you can use that service during development.
-
My workspace says it's out of quota. how do I fix it?
-
You can inspect your current quota usage with the df command in the Terminal:
-
$ df
-
To find which files and directories are consuming a lot of space, go to a directory such as your home directory, and run this command:
-
$du-m-d1-a|sort-n
-
This should give you a list of all members of that directory and how much space they use in megabytes.
-
Alternatively, try du-c9 for seeing all files you added to your workspace and account for the quota.
-
Can I use two-factor authentication with Cloud9?
-
You can sign into Cloud9 with your github or bitbucket account and set that up to use two-factor authentication.
-We don't currently provide an option to directly setup your Cloud9 account for two-factor authentication.
-
I can't preview my running app.
-
Try using port 8080 instead, which often solves this case.
-
EADDRINUSE: My app complains that the address/port is in use
-
Applications won't start if another application is already listening to the same port. In order to fix it you first need to find out which process that is:
-
$ netstat -nlp | grep $PORT
-
This will report the process id (PID) which you can then kill using
-
$ sudo kill -9 <PID>
-
Often apache is still running in the background. In that case you can kill it using
-
$ sudo pkill apache2
-
How can I upload local files to my project?
-
Either drag a local file directly from your desktop into the Cloud9 file tree,
-or use the "File > Upload Local Files" menu item.
-
How can I download my project files?
-
Use "File > Download project". Currently, this will give you a .tar.gz file, which
-ensures maximum portability. To open these files, you can use something like
-WinRAR or 7-zip.
-
How can I share a single directory of a private workspace
-
Sometime you might want others to open a file or directory in the browser
-without opening up the whole workspace. 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 "sharing" button at
-the top right and the check "public" for application.
-
To run the server open a terminal and do
-
$ cd /dir/i/want/to/share
-$ python3 -m http.server 8080
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
FAQ: SSH workspaces
-
I cannot create a SSH workspace using a Digital Ocean droplet
-
We recently discovered our web host is blocking connections to some Digital Ocean IP addresses because they suspect they are being used by Iranian users. They are legally forced to block them.
-
Digital Ocean maintains a whitelist of droplet IP addresses which should not be blocked and our web host follows this list.
-
Please raise a support ticket with Digital Ocean mentioning that you would like to have your droplet IP added to the whitelist. After this is complete you will be able to create your SSH workspace within 24 - 48 hours.
-
I'm getting an error on the SSH install script: "ncurses not found"
We are choosing the PHP workspace type to in order to have the Apache runner
-as a default so you can just click Run Project to get started. This doesn't
-limit the choice of the backend technology you might want to use.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/frameworks_drupal.html b/out/frameworks_drupal.html
deleted file mode 100644
index f793d55..0000000
--- a/out/frameworks_drupal.html
+++ /dev/null
@@ -1,239 +0,0 @@
-
-
-
-
-
- Framework: Drupal | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Framework: Drupal
-
For Drupal there are some installation guides around which tell you to install PHP first, but that's not necessary with Cloud9.
-You don't need to install MySQL either, it is already preinstalled in PHP workspaces.
-Just make a new workspace, choose PHP, go to the Terminal, and execute the following:
Open the file install.php in the file tree, and while opened, click on the "Run Project" button in the menu bar on top of the IDE.
-An URL will be shown at the bottom of the page, something like "https://drupal-c9-lcipriani.c9.io/", but with your username and workspace name in it.
-
Copy the url in a new browser tab and you will see the install page of Drupal
-
You can now proceed with the installer
-
-
Now be careful inserting the correct values for the database. You need to change the values as follows:
-
user: yourusername
-database: c9
-host: 127.0.0.1
-
Note:
localhost will not work, while 127.0.0.1 will.
-
-
-
Open the Advanced Options in the database settings page as shown in the screenshot:
-
-
Now fill the form with the correct site information:
-
-
Continue the setup and enjoy your website!
-
Note:
if you are not able to load CSS, access your website WITHOUT using https, but use simple http; in another tab open the url: http://drupal-c9-lcipriani.c9.io/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/frameworks_express.html b/out/frameworks_express.html
deleted file mode 100644
index b595684..0000000
--- a/out/frameworks_express.html
+++ /dev/null
@@ -1,229 +0,0 @@
-
-
-
-
-
- Framework: Express | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
Framework: Express
-
Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.
-
To get started with an Express app, first create a workspace and choose either the Node.js type, or a Custom workspace type for a clean workspace. Open the new workspace (or an existing one) to follow the instructions below.
-
Installation
-
First we'll install the Express project generator and generate an application stub:
You might want to take a look at package.json and update the application name from the default workspace to something more fitting.
-
Running
-
Now you have a fully configured express application already. You can run it from the terminal using:
-
$ bin/www
-
Now if you click the Preview button in the top menu in the IDE, and choose "Preview with Web Server", this will open the Preview window for your running app.
-
Creating a Run Configuration
-
In order to make life easier you can create a run configuration for express.
-
-
Click Run -> Run Configurations -> Manage ...
-
Click Add New Config
-
In the run panel fill in Express as name, bin/www as the command and Node 0.10.x as the runner.
-
You can optionally make this run configuration the default runner by clicking Set As Default. If you do so then clicking the run button will always run the app and not the currently opened file.
-
-
The finished run configuration should look something like this
Run Ghost by typing npm start in the console or by opening index.js and
-hitting the run button.
-
-
Click the "Preview" button in the top menu in the IDE, and choose
-"Preview with Web Server". This will open the Preview window for your newly setup Ghost blog
-
-
Change the URL to /ghost and create your admin user to login to the Ghost admin interface
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Framework: Jekyll
-
Jekyll is a great static site generator, also used by github pages. You simply need to install the Ruby gem and then make sure you pass the right port to the serve command.
-
$ gem install jekyll
-$ jekyll new my-awesome-site
-$ cd my-awesome-site
-$ jekyll serve --port $PORT
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/frameworks_joomla.html b/out/frameworks_joomla.html
deleted file mode 100644
index be8dd8c..0000000
--- a/out/frameworks_joomla.html
+++ /dev/null
@@ -1,248 +0,0 @@
-
-
-
-
-
- Joomla | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
Joomla
-
Joomla is a popular open source CMS.
-Installing Joomla is very straightforward, but there are just a few quirks to keep in mind, which we describe below.
-
Note:
all instructions here are based on Joomla v3.x.
-
-
Joomla requires a MySQL database to connect to. MySQL is pre-installed in your workspace, so just execute these commands:
-
mysql-ctl install
-mysql-ctl start
-
... and then note the credentials to use in the configuration of Joomla later on.
-
Install Joomla
-
To run the Joomla installer, open index.php and run it with the "Run" (or "Run Project") button at the top of the IDE.
-Next, click the URL that's displayed in the Run panel, which looks something like https://joomla-c9-username.c9.io/installation/index.php#.
-This will open up the Preview window with the installer.
-
Now, here comes the quirky part: the installer will not work properly if it's loaded over HTTPS, as the Cloud9 Preview window does by default.
-So, in order to make the Joomla installer work, do the following:
-
-
Pop out the Preview by clicking the Popout icon (or copy & load the URL in a browser tab)
-
Change the URL from https:// to http:// and load it
-
-
Now you should be able you to get through the installer successfully.
-
Main configuration
-
The main Configuration screen should look like this:
-
-
Enter whatever values you'd like here.
-
Database
-
The second quirky and important thing to keep in mind in the Database section, is to use Host Name "0.0.0.0" instead of "localhost".
-
So use values like shown in the screenshot below:
-
-
Finally
-
Use whatever settings you'd like in the final installation screen, and after it completes, have Joomla remove the Installation folder for safety.
-
That's it, you're done and your Joomla setup should run fully on Cloud9!
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Framework: Koa
-
Koa is a new web framework designed by the team behind Express, which aims to be a smaller, more expressive, and more robust foundation for web applications and APIs.
-
To get started with a Koa app, first create a workspace and choose either the Node.js type, or a Custom workspace type for a clean workspace.
-
Koa.Js makes use of the new generator feature in javascript ECMA 6.
-This feature is support in Node from 0.11 and up by toggling the --harmony flag.
-By default Cloud9 runs Node v0.10.x or v0.8.x, depending on your setup, so we first need activate Node version 0.11.x.
-
Open a Terminal, or using the pre-existing one at the bottom and execute the following in your Terminal:
-
nvm use 0.11
-
Next, we need to install Koa itself:
-
npm install koa
-
Now we can create a simple Koa.Js server.
-Create a server.js file in your root folder with this code:
-
var koa = require('koa');
-var app = koa();
-
-app.use(function *(){
- this.body = '<h1>Hello from Koa.Js</h1>';
-});
-
-app.listen(process.env.PORT);
-
If you now press the Run button on top of the IDE, you will see some errors, as the runner/debugger defaults to 'Node (default)', which is Node version 0.10.x or 0.8.x.
-
Luckily all you need is to create a Runner file so Cloud9 can run Node 11.x in harmony mode and thereby support generators.
-
In the Run panel below, click the 'Runner' text input and choose 'New Runner'.
-In the new Runner file that's opened, save the following code as 'Node 0.11.x.run':
-
// This file overrides the built-in Node 0.11.x runner
-// For more information see http://docs.c9.io:8080/#!/api/run-method-run
-{
- "cmd": [
- "bash",
- "--login",
- "-c",
- "nvm use 0.11 > /dev/null; node --harmony ${debug?--nocrankshaft --nolazy --debug-brk=15454} '$file' $args"
- ],
- "debugger": "v8",
- "debugport": 15454,
- "info": "Your code is running at \\033[01;34m$url\\033[00m.\n\\033[01;31mImportant:\\033[00m use \\033[01;32mprocess.env.PORT\\033[00m as the port and \\033[01;32mprocess.env.IP\\033[00m as the host in your scripts!\n"
-}
-
Note:
alternatively, you can check 'Show Hidden Files' in your workspace directory tree (the small gear in the upper right corner), and create a new file in the '.c9/runners' folder called 'Node 0.11.x.run' with this code.
-
-
-
Let's run server.js with this new configuration; in the Run panel on the bottom, choose your new 'Node 0.11.x' Runner, and press Run again.
-
You Koa.Js server should now be up and running.
-
Now if you click the Preview button in the top menu in the IDE, and choose "Preview with Web Server", this will open the Preview window for your running app.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Framework: Laravel
-
For Laravel there are some installation guides around which tell you to install PHP first, but that's not necessary with Cloud9.
-Just make a new workspace, choose PHP, go to the Terminal, and execute the following:
As lavarel is serving its content from the public directory we need to modify the apache config:
-
sudo vi /etc/apache2/sites-enabled/001-cloud9.conf
-
Then do the following:
-
// Change this line
-DocumentRoot /home/ubuntu/workspace
-
-// To following
-DocumentRoot /home/ubuntu/workspace/public
-
Run the project with the "Run Project" button in the menu bar on top of the IDE.
-If you click the URL that appears in the Run panel below (in the shape of 'https://laravel-c9-username.c9.io/'), you can preview your new Laravel app.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/frameworks_meteor.html b/out/frameworks_meteor.html
deleted file mode 100644
index 599360c..0000000
--- a/out/frameworks_meteor.html
+++ /dev/null
@@ -1,221 +0,0 @@
-
-
-
-
-
- Framework: Meteor | Cloud9 User Documentation
-
-
-
-
-
-
-
Open your Terminal and execute the following to create a new Symfony-Project
-You need the first line only if you used the PHP Project type for your workspace.
The create-project composer command will ask for a few parameters, the only one you need to pay special attention is the database-host parameter.
-
Running the project
-
There is a IP address checking in the web/app_dev.php file. To disable this check please remove the following lines
-
// This check prevents access to debug front controllers that are deployed by accident to production servers.
- // Feel free to remove this, extend it, or make something more sophisticated.
- if (isset($_SERVER['HTTP_CLIENT_IP'])
- || isset($_SERVER['HTTP_X_FORWARDED_FOR'])
- || !in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1'))
- ) {
- header('HTTP/1.0403 Forbidden');
- exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
- }
-
After that add a new run configuration in Menu Run > Run Configurations > New Run Configuration. Select Apache http (PHP, HTML) as a Runner and web/app_dev.php as Command.
-That's it after you hit Run your server will start up and you can access your new Symfony project.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Setting up an FTP project
-
-
-
-
-
In this article, we'll show you how to set up an FTP project.
-
Note:
Currently, Cloud9 IDE only supports passive FTP. Active FTP, SFTP and FTPS are not yet supported. For SSH connections, consider creating an SSH workspace.
-
-
-
To create an FTP project, go to the Dashboard and click on the next to MY PROJECTS. Choose the option to Create a new project (see "Creating a New Project" if you need to review the steps to create a new project):
-
In the pop-up window that appears, select FTP for the project type:
-
-
Let's review the options available for your FTP project:
-
-
Hostname: the domain name or IP address of the machine running your FTP server.
-
Username: your username for the FTP server.
-
Password: your password for the FTP server.
-
Initial path: this is an optional parameter. You can set it as an absolute (starts with /) path. Otherwise, it'll be set to a relative path, and Cloud9 assumes that you want to start from the folder your FTP server leaves you after login (home or default folder).
-
-
Warning:
Be careful not to put an initial path that leaves you in a location where you don't have write privileges as that could cause problems.
-
-
-
Fill in your FTP details and click the Login Test to verify that the settings are correct. If the test succeeds, go ahead and click Create to create your FTP project. You'll then see your project in the Dashboard under My Projects:
-
-
When your new FTP project is selected, you will see three buttons: Start Editing, FTP settings, and Delete (on the far right). FTP settings gives you access to the settings you just filled in, as well as the login test. This is useful to use in case your login credentials have changed.
-
To get started with your FTP project, click on the Start Editing button. You'll be taken to the editor. Under Project Files, you should see the files from the FTP server in the directory you selected (either your home/default folder or the location indicated by the Initial Path, if you set it). The editor for FTP projects works the same as in other projects: you can create and edit your files in the usual way. The main difference is the FTP log at the bottom of the page (where the console is usually located for other non-FTP projects).
-
The FTP log displays output related to the interaction with the FTP server. The screenshot below, for example, shows what happens when we create a new file called TestFile.txt. The file is created in the FTP server and when I write to it, the contents are transferred.
-
-
Note:
In an FTP project, all files are stored on your FTP server; Cloud9 only stores the FTP settings. Please keep this in mind. Cloud9 IDE does not keep any copies of your files, so make sure you back them up properly. Any changes you make to these files in Cloud9 are automatically reflected on the live web server.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/git_blame.html b/out/git_blame.html
deleted file mode 100644
index c6aec83..0000000
--- a/out/git_blame.html
+++ /dev/null
@@ -1,215 +0,0 @@
-
-
-
-
-
- Git Blame | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Git Blame
-
Note:
this feature is deprecated
-
-
-
-
-
-
-
When you're working with git repositories, it's helpful to know who made a commit to a particular piece of code. As it turns out, git has a feature called git blame that we've integrated directly into Cloud9 IDE.
-
By using git blame, you'll be able to instantly discover who edited certain lines of code, when they edited it, and what their commit message at the time was. Clicking on a git commit also highlights other lines of code changed at the same time. To launch the git blame feature, open a file and navigate to Tools>Git>Blame.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/gotofile_and_definition.html b/out/gotofile_and_definition.html
deleted file mode 100644
index 75139e3..0000000
--- a/out/gotofile_and_definition.html
+++ /dev/null
@@ -1,222 +0,0 @@
-
-
-
-
-
- Using Goto File and Goto Definition | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Using Goto File and Goto Definition
-
Note:
this article is outdated, a new version will follow soon
-
-
-
-
-
-
-
Let's say you're working a large project containing many files, and you kind-of sort-of know the name of a file that you want to open up. Goto File is our feature to help you quickly and easily jump to any file in your workspace, without the need to search through different directories. Simply hit Cmd-E (or Ctrl-E on Unix/Windows) and away you go:
-
-
Goto File offers filtering for any portion of a filename, including directories. Search for the beginning, middle, or end of a file path, or even just an extension, like .js, and Goto File with instantly present the results to you. Clicking on a name in the list opens the file right up. Goto File does not support case-insensitive, wildcard (*, ?), or regular expression (., +) searching.
-
Goto Definition takes the same concept and applies it to files. You can easily navigate between classes and members defined in your files. By entering text, you can filter your class' member results. Finally, as you navigate through your file, Cloud9 IDE will jump to the relevant portion of the code:
-
-
Note:
Currently, Goto Definition only works for Javascript files.
-
-
-
Another feature that's available is the capability to "jump to definition." If your cursor is on a variable or function name, you can tap F12 (or type jumptodef in the console) to instantly scroll the editor to the member's definition.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/ide_overview.html b/out/ide_overview.html
deleted file mode 100644
index cab8018..0000000
--- a/out/ide_overview.html
+++ /dev/null
@@ -1,236 +0,0 @@
-
-
-
-
-
- IDE Overview | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
IDE Overview
-
Note:
this article is outdated, a new version will follow soon
-
-
-
Cloud9 IDE can be thought of as being divided into the following components:
-
-
Throughout the documentation, we'll refer to these sections by name. We can identify several distinct areas in the editor:
-
-
The top menu bar is the uppermost area, with easy access to a variety of menus
-
The project bar on the left lets you manipulate various aspects of your project, including its active files, preferences, and choices for deployment
-
The panel displays views according to what's been selected in the project bar
-
The toolbar is on the far right, where you can find tools used when debugging your code. Projects that are open with collaboration also make use of this panel for chatting.
-
The code editor is the main area where you write your code.
-
The console is the bottom area of the window. It's an expandable area that can act like a desktop terminal to enter command line input (like ls or mkdir). It also displays output provided by your program's print statements (like console.log()), as well as providing an area for search results
-
-
The Project Bar, Tool Bar, and Console are powerful features, so their documentation is provided separately. We'll talk about the rest of the editor below:
-
Remember: nearly every UI element can be collapsed, in order to provided a more harmonious coding experience. For example, clicking on the buttons in the upper left of the editor allows you to hide the panels and top menu bar:
-
The Top Menu Bar
-
-
In this section, you can find the usual menus for creating and saving files, changing your view, applying a new theme for the editor, and switching between windows.
The preview button provides you with a look of what the currently active file would look like in the browser. For text files, this is usually just the raw text, but certain files, like HTML or XML, render as the actual markup.
-
The autosave button indicates the status of your current saves: . Files are saved automatically by Cloud9 IDE, and every revision is made available for you to browse through. For more information, see the section on revisions and saving.
-
On the far right of the menu, near the Cloud9 IDE logo, there are two more icons: one to return to the dashboard, and one to return to the Cloud9 IDE homepage.
-
The Code Editor
-
This is where most of the action happens. Every file you open appears here as a tab. You can open a new file easily by clicking on the button to the right of the last tab. Cloud9 IDE offers syntax highlighting for over two dozen programming languages.
-
The code editor supports a large number of keyboard shortcuts to increase your productivity. For an up-to-date list of these within the IDE, simply go to Help>Keyboard Shortcuts.
-
If you hover over to the upper-right corner, you can activate zen-mode, which is a full screen coding environment.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
IDE Preferences
-
Note:
this article is outdated, a new version will follow soon
-
-
-
There are many different ways to configure the IDE. Below is a list of the options available, and what they do.
-
Note:
All of these options are on a per-project basis. Changing them in one project does not affect any another.
-
-
-
General
-
This section controls the overall IDE behavior:
-
-
-
-
Preference Name
-
Description
-
-
-
-
-
Enable UI Animations
-
Enables or disables fluid animations for various UI elements, such as the Project Bar
-
-
-
Animate Scrolling
-
Enables or disables fluid animations when scrolling through code (such as for goto line)
-
-
-
Enable Auto-Save
-
If enabled, automatically saves your files on every change
-
-
-
On Save, Strip Whitespace
-
When saving a file, you can remove all extraneous whitespace from your code lines
-
-
-
Reveal Active File in Project Tree
-
Enabling this jumps the project tree to the active file whenever a tab changes to a different file
-
-
-
Warn Before Exiting
-
Prevents accidental data loss by showing a dialog asking if you really want to leave Cloud9 IDE when closing your browser
-
-
-
Node.js Runtime
-
Defines the default runtime for your Node.js code. "Auto" is based on whatever is in the package.json file, while "Default" reverts to Node 0.6.x.
-
-
-
Keybindings
-
Allows you to choose which operating system to use for keyboard shortcuts
-
-
-
-
Language Support
-
This section controls language analysis options:
-
-
-
-
Preference Name
-
Description
-
-
-
-
-
Enable Hints and Warnings Rules
-
Presents information about your code in the gutter
-
-
-
Highlight Variable Instances
-
Highlights variable instances in your code
-
-
-
Mark Undeclared Variables
-
Provides warnings if a variable is being used and has not been declared yet
-
-
Mark Unused Function Arguments
-
Provides a strikethrough for arguments in a function that are not being used
-
-
-
Warning Level
-
Specifies the minimum level of information severity you want provided in the gutter
-
-
-
-
Code Editor
-
This section controls language analysis options:
-
-
-
-
Preference Name
-
Description
-
-
-
-
-
Auto-pair Quotes, Brackets, etc.
-
When enabled, typing ", (, or [ will actually make two characters appear. In addition, whenever you highlight a word and type one of these characters, it is surrounded by that character (e.g. words becomes "words")
-
-
-
Full Line Selection
-
When highlighting lines, this option will highlight all ending whitespace, until the end of the editor window
-
-
-
Highlight Active Line
-
Presents a darker shade in the code editor to indicate which line you're currently on
-
-
Highlight Gutter Line
-
Presents a darker shade in the gutter which line you're currently on
-
-
-
Show Invisible Characters
-
Shows invisibles characters in the editor, like tabs and line breaks
-
-
-
Show Indent Guides
-
Shows the indent guides in the editor, letting you see your code's nestings
-
-
-
Show Gutter
-
Shows the gutter in the editor, which indicates line numbers, warnings, and errors
-
-
-
Highlight Selected Word
-
If you highlight a word, this highlights all matching words in the editor
-
-
-
Auto-hide Horizontal Scroll
-
When this is enabled, this will hide the horizontal scroll bar in the editor. Note that this has no effect in Mac OS X 10.7 (Lion) and above, since all scrollbars, by default, auto-hide.
-
-
-
Vim Mode
-
When enabled, allows you to use vim keybindings in the IDE
-
-
-
Code Folding
-
When enabled, allows you to show or hide "blocks" of code
-
-
-
Fade Fold Widgets
-
When enabled, fades the folding widgets in the gutter
-
-
-
Font Size
-
Changes the font size of the code in the editor
-
-
-
Show Print Margin
-
Shows (and defines) the number of characters possible in line, before it wraps
-
-
-
Soft Tabs
-
Indicates how many spaces a single tab represents
-
-
-
Mouse Scroll Speed
-
Defines the speed of the mouse scrolls
-
-
-
Newline Mode
-
Specifies the newline mode for the IDE
-
-
-
-
Terminal
-
This section controls the behavior for the terminal:
-
-
-
-
Preference Name
-
Description
-
-
-
-
Scrollback
-
Sets the scrollback buffer for the terminal
-
-
-
Font Family
-
Sets the font for the terminal
-
-
-
Font Size
-
Sets the font size for the terminal
-
-
Blinking Cursor
-
Specifies whether or not you want the cursor to blink
-
-
-
-
Code Tools
-
This section controls the various tools that are available in the IDE:
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Welcome to the official Cloud9 IDE documentation! Here, you'll find articles and tutorials to help you use the Cloud9 platform. These include everything from setting up a workspace, to learning how to run, debug, and deploy your code.
-
-
-
Getting started
-
Have a look at the "Getting Started" section on the left for an introduction into the basics of Cloud9.
-For instance, read up on how to:
If you're interested in troubleshooting specific aspects of the IDE, need help setting up an account, or just want to chat with our support team, please visit the Support pages.
-
Contact Us
-
Remember: All of our documentation content is open-sourced on GitHub, just like our amazing IDE.
-
See something that's not documented here? Simply add it to the documentation with a Pull Request, or send an e-mail to docs@c9.io, and we'll get it in.
-
Recently Updated Topics
-
Here's a list of the last five recently updated topics:
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Installing NPM Modules
-
Since Cloud9 IDE is built on top of Node.js, we also leverage the module system NPM. In Cloud9, you can install any npm package either locally or globally. Note that due to security restrictions, modules installed globally can only be used in the project they were installed from. In other words, while you have access to any command line tools installed by the module, they are bound to the project, not your username. We run version 1.1.24 of npm.
-
To demonstrate the power of NPM, we'll build and run a quick express server:
-
-
Launch the command line by hitting Shift-Escape. You can also go to View>Command Line if it's not visible.
-
Type npm install express, and wait for the npm install process to complete.
-
Create a new JavaScript file, and paste the following code:
-
-
var express = require('express'),
- app = express();
-
-app.use(express.logger());
-
-app.get('/', function(req, res){
- res.send('Hello World');
-});
-
-app.listen(process.env.PORT);
-console.log('Express server started on port %s', process.env.PORT);
-
To launch your express server, click on the button in the menu bar.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/installing_python_packages.html b/out/installing_python_packages.html
deleted file mode 100644
index c6e1f4e..0000000
--- a/out/installing_python_packages.html
+++ /dev/null
@@ -1,219 +0,0 @@
-
-
-
-
-
- Installing Python Packages | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Installing Python Packages
-
Cloud9 supports the installation of Python packages for applications that need to go beyond the standard library set. Every workspace has version 0.6.10 of Python's easy_install package manager. For more information on this module, see the official easy_install documentation.
-
Let's try installing a package. First, type the following in the console:
-
easy_install markdown
-
This installs the markdown Python package to your workspace. You won't see the package installed in the directory tree, because it's kept deep within your project's the Python libs.
-
Next, create a new Python script, and add these lines of code:
After clicking run, the console will correctly print out <h1>HELLO THERE!</h1>.
-
You have access to all of the functionality easy_install provides you. For example, you can open up the Python REPL and type the following to see a list of your installed packages:
-
>>> help('modules')
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/installing_ruby_gems.html b/out/installing_ruby_gems.html
deleted file mode 100644
index e41f026..0000000
--- a/out/installing_ruby_gems.html
+++ /dev/null
@@ -1,223 +0,0 @@
-
-
-
-
-
- Installing Ruby Gems | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Installing Ruby Gems
-
Cloud9 supports the installation of Ruby gems in your workspace using the RubyGems package manager. The current installed RubyGems version is 1.3.7. For more information on the gem command, see the official RubyGems documentation.
-
Let's try installing a gem. First, type the following in the console:
-
gem install progressbar
-
This installs the progressbar Ruby gem to your workspace. You won't see the gem installed in the directory tree, because it's kept deep within your project's the Ruby libs.
-
Next, create a new Ruby script, and add these lines of code:
After clicking run, the console will start printing out an ASCII progressbar.
-
You have access to all of the functionality gem provides you. For example, you can open up the console and type gem query to see a list of your installed gems.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/keybindings.html b/out/keybindings.html
deleted file mode 100644
index e6ff973..0000000
--- a/out/keybindings.html
+++ /dev/null
@@ -1,1210 +0,0 @@
-
-
-
-
-
- Commands and Keybindings | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Commands and Keybindings
-
Note:
this article is outdated, a new version will follow soon
-
-
-
Nearly every action in Cloud9 has a corresponding command associated with it. On top of that, every command also has a keybinding that can be used to effortlessly execute the command.
-
Below is a list of every single command and keybinding used by Cloud9. Have fun being efficient!
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
Language Analysis
-
For JavaScript files, Cloud9 provides analysis using a combination of our own analysis tools, as well as JSHint (specifically for Javascript code). Our language analysis can't detect if your program is correct, fast, or has memory leaks, but it can save you time by spotting things like undeclared variables, syntax errors, or other preventable typos.
-
When Cloud9 detects an issue with your code, an icon appears in the gutter for the offending lines of code. There are three types of identifiers available for your code:
-
-
Informational (): these are non-critical, non-dangerous updates about your code
-
Warnings (): these are potentially incorrect pieces of code
-
Errors (): these are incorrect lines of code that will almost certainly throw a runtime error when you try to run your script
-
-
If you hover over any of these icons in the gutter, you'll get a pop-up that presents some information as to what, exactly, the problem is. For example, suppose we have a variable declared, called fs, that is never used:
-
Notice also that fs has a strikethrough, to provide further visual clues that something is not quite right.
-
If you're concerned with the level of information that's listed in the gutter, you can always configure its "strictness" in the IDE preferences. For example, you could choose to hide every icon that isn't a warning or an error.
-
Configuring Global Options
-
JSHint provides additional configuration options that Cloud9 incorporates on a per-file basis. Typically, you declare these options as comments at the very top of a file, like this:
-
/*jshint curly:true, debug:true */
-
For a full list of the JSHint configutation options, please check the documentation page describing them.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Multiple Cursors
-
Multiple cursors is one of the most useful features available in the Cloud9 editor. You can use multiple cursors to perform tasks like rename several variables or members at once, break up lists separated by commas, or insert the same text in multiple locations.
-
-
Multiple selections can be copied and pasted, and you can insert or remove entire lines in several locations.
-
There are several ways to get access to mutliple cursors:
-
-
Via keyboard shortcuts, you can create a new cursor in any direction
-
By holding the Alt key, clicking the mouse, and dragging the cursor up or down in the editor
-
Through the menu bar at Selection>Multiple Selections
-
-
One of the best capabilities is the ability to instantly select the next instance of your currently highlighted section. This is especially useful for refactoring several parts of the code at once. To do this, press Ctrl-Alt, followed by the right (or left) arrow key to navigate around in the code.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/project_bar.html b/out/project_bar.html
deleted file mode 100644
index 8d849e0..0000000
--- a/out/project_bar.html
+++ /dev/null
@@ -1,220 +0,0 @@
-
-
-
-
-
- The Project Bar | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
The Project Bar
-
Note:
this article is outdated, a new version will follow soon
-
-
-
The project bar is located towards the left of the Cloud9 IDE:
-
The buttons in the project bar allow you to reveal and hide panels for the IDE. In more detail:
-
-
Pressing on the Cloud9 icon collapses the panel area
-
Project Files shows your workspace's directory structure. You can view all your files here. Right-clicking within this panel reveals a drop-down menu with additional options, such as the ability to rename files or create new directories.
-
Active Files lists your files that are currently open.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Revisions
-
Note:
this article is outdated, a new version will follow soon
-
-
-
-
-
-
-
Every time you save a file on Cloud9, a diff of any changes made to it is saved by the server. Over time, you can view these file revisions as content is added and removed from your files. You can also restore a file to any previously saved state; you'll never have to worry about losing your work ever again!
-
To access file revisions, you can either go to File>File Revisions History, or type Cmd-B on Mac or Ctrl-B on Linux/Windows. This will pop open the Revisions History panel. Red lines indicate lines that were removed; green lines indicate lines that were either added or changed.
-
At the bottom of the panel, there's a checkbox for showing all of a file's changes. Files changes that occur relatively soon to one another--say, a few seconds--are grouped by the revisions panel as one "change." If you prefer to see every single change as an individual entry, enable the Show all file changes checkbox.
-
To restore a file to a previous revision, simply click the revisions button for that entry:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/run_an_application.html b/out/run_an_application.html
deleted file mode 100644
index f994ddf..0000000
--- a/out/run_an_application.html
+++ /dev/null
@@ -1,245 +0,0 @@
-
-
-
-
-
- Run an application | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
Run an application
-
On Hosted and SSH workspaces, Cloud9 provides two ways to run your application:
-
-
Using the Run panel with built-in Runners for many languages
-
From a Terminal
-
-
Method 1: Use the Run panel
-
First, open the file you want to run.
-
Next, click on the Run button in the top menu bar in the IDE.
-
-
The Run button acts as a sort of shortcut to the Run panel, which will appear by default in the bottom of the IDE when you run a file.
-This automatically runs the currently active file, and it will guess which Runner to use based on the extension of the file.
-
When you're ready to stop your app, click on the Stop Button button in the menu bar at any time, or from the Run panel below.
-
-
On the Run panel, you'll notice a few more options you can set.
-Filling these textboxes out creates a Run Configuration.
-
-
Name: the name of your run scenario
-
Command: the command you want to run; this is usually the location of your running file in your project, but it also allows you to provide any additional command line arguments you want to pass to your app
-
Runner: defines how you want your code to be run. A wide range of Runners is available by default, from Apache to Node.js and Shell scripts, and you can define your own.
-
CWD: Set the current working directory to start from
For some default runners like Node.js, it's an option to Run in debug mode, which indicates that you want to run the current code through the debugger.
-This will reveal (or collapse) the debugging tools panel described in Running and Debugging your code.
-
Method 2: From the Terminal
-
The built-in Terminal provides access to all underlying system commands, including your Runners such as Node.js.
-Simply open up a Terminal from the "+" sign, or use CMD+T (Mac) / Control+T (Windows), and then execute the command you need to run your app, e.g. node server.js.
-
(Pre-)View your application
-
To find out where your application is running you can do two things:
-
-
Use the Preview button on the top to preview one of your files. The URL in the browser bar in the Preview can also be used in any browser tab/window.
-
Use the Share button on the top to figure out the URLs of running Application and the Preview. The Editor URL is only used to share your entire Cloud9 workspace to collaborate on code.
-
-
Tip:
If you can't find how to preview your running app, try to use port 8080 in the URL.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
Running Your Own SSH Workspace
-
You have access to an incredibly powerful feature of Cloud9 that we like to call "running your own workspace."
-
If you own a server that you can SSH into, you can log into that machine with Cloud9 and work on your projects remotely. To put this into perspective, you could have an entire toolchain set up on this machine--say, make with gcc, or ant with Java--edit the files with Cloud9 IDE, and build your toolchain via the IDE's terminal. Here's a video demonstrating how you could instantly compile a C program using an SSH workspace and Cloud9:
-
-
-
-
-
Connection Prerequisites
-
In order to connect Cloud9 with a server you own, you'll need two things:
-
-
Node.js installed on the server. This version must be between Node.js version 0.6.16 and the latest 0.8.x.
-
Your public SSH key must be saved on the server at ~/.ssh/authorized_keys. This is to ensure the utmost security between your client computer and the machine you're attempting to access. Cloud9 provides you with your SSH key in the workspace dialog; it is up to you to save it to the appropriate path. For more information on SSH keys, see this article.
-
-
Tip:
If you're behind a firewall, you can identify which IP address and port Cloud9 is running on by typing echo $OPENSHIFT_INTERNAL_IP and echo $OPENSHIFT_INTERNAL_PORT into the console. You can use this information to open any blocked connections.
-
-
-
Creating an SSH Workspace
-
Once you've got those requirements set up, here's how you can create an SSH workspace of your own:
-
In the Projects tab on the Dashboard, click on the next to MY PROJECTS and choose the option to Create a new project (see "Creating a New Project" if you need to review the steps to create a new project):
-
In the pop-up window that appears, select SSH for the project type:
-
You don't need to fill out every option provided by the dialog. Let's review what they are:
-
-
Hostname: the domain name or IP address of the machine running your SSH server.
-
Username: your username for the SSH server.
-
Node.js Binary Path: the locaton of your Node.js binary. If you're not sure where it is, you can always let Cloud9 guess it for you. Otherwise, on your server, type which node, to see the full path
-
Initial path: this is an optional parameter. You can set it as an absolute (starts with /) path. Otherwise, it'll be set to a relative path, and Cloud9 assumes that you want to start from the folder your SSH server leaves you after login (usually the home or default folder).
-
Port: this is an optional parameter. Cloud9 will automatically try to connect on port 22
-
-
Warning:
Be careful not to put an initial path that leaves you in a location where you don't have write privileges, as that could cause problems!
-
-
-
Fill in your SSH details and click the Login Test to verify that the settings are correct. If the test succeeds, go ahead and click Create to create your SSH connection. You'll then see your project in the Dashboard under My Projects:
-
-
When your new SSH is selected, you will see three buttons: Start Editing, SSH settings, and Delete (on the far right). SSH settings gives you access to the settings you just filled in, as well as the login test. This is useful to use in case your login credentials have changed.
-
Warning:
Make sure that you copied your SSH key correctly! Trailing spaces are significant, so make sure your text editor on your server is not modifying the key that Cloud9 is providing you with.
-
-
-
To get started with your SSH project, click on the Start Editing button. You'll instantly be taken to the editor, and have full access to your server's resources. As you can see in the video above, this means you can do exciting things like compiling C programs.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
Running and Debugging Your Code
-
Cloud9 IDE provides several ways to run and debug your code. We'll explore each of them in this section of the documentation.
-
Note:
Currently, only Javascript/Node.js applications can make use of the debugger. You can also execute Javascript/Node.js, Python, Ruby, and Apache+PHP applications.
-
-
-
The following information applies to all of the above programming languages.
-
Running Code
-
Running your code in Cloud9 is really easy. First, open the file you want to run. Usually, this file is going to be the main entry point to your app; for example, if you're creating a server, you'd want to run the file that actually instantiates that server.
-
There are two ways to run your code: either through the Run Panel, or through the run button in the menu bar.
-
Using the Run Panel
-
Next, click on the Run button in the project bar. You'll notice immediately that your active file is already available to run. Just double-click on the file, and you'll launch your app.
-
When you're ready to stop your app, click on the button in the menu bar at any time.
-
At the bottom of the run panel, you'll notice a few more options you can set. Filling these textboxes out creates a run scenario, which is like setting up some configurations for the way your code runs. These options are:
-
-
Name the name of your run scenario
-
File Path: the location of your running file in your project
-
Runtime: defines how you want your code to be run. Typically, you'd set different runtime versions here.
-
Cmd Line Args: allows you to provide any additional command line arguments you want to pass to your app
-
-
Of course, you can also save your run scenarios; just click on the add button at the top of the panel. When you're ready to run a scenario, click on its name in the Run panel list. To remove a run scenario, click on its name in the run panel list, and then click on the remove button.
-
Using the Run Button
-
The run button in the menu bar acts as a sort of short cut to the Run panel. When clicked, the button automatically runs the currently active file. If you have a list of run scenarios already defined, the run button also presents a list of those:
-
-
Run in debug mode indicates that you want to run the current code through the debugger. Auto show & hide debug tools will reveal (or collapse) the debugging tools panel described below. You can also work with this presentation by going to View>Panels, and configuring the debugger there.
-
Console Output
-
Every time you run a project, the console expands to reveal output from your program. If you're launching a server, Cloud9 provides you with a URL to access the project. Otherwise, any statements sent by your application's print statements (like console.log() for Javascript, print for Python, or puts for Ruby) are also shown here. For example:
-
Debugging Your Code
-
Setting up a project to debug is done in very much the same way as running your code. The only difference is that you must click on the run settings icon in the Run panel and select Run in debug mode. Similarly, you can select Run in debug mode from the run button.
-
Initially, the only difference this will make is the expansion of the debugging toolbar to the right of the editor:
-
This toolbar, however, grants you the following capabilities:
-
-
-
-
Toolbar Icon
-
Debugging Function
-
Description
-
-
-
-
-
-
Debugging Navigation
-
This is a set of tools you can use to move around your code while debugging. You can step into, over, and out of your code, or simply press play to run the process until the next breakpoint.
-
-
-
-
Callstack
-
This is a structured list of information about the sequences of your code--basically, which functions are calling what, and where you are in the current process. It also stores local variables and function arguments, if present. You can use this feature to check how your code is running:
-
-
-
-
Interactive Mode
-
Lets you evaluate a piece of code, such as expressions or the values and properties of variables. The text field allows you to type any code you want, in case you discover a way to fix you problem:
-
-
-
-
-
Variable Inspection
-
This shows all the related variables (including functions) that are present in the current context:
-
-
-
-
-
Breakpoint List
-
At any point during your coding or debugging session, you can click on the gutter to apply a breakpoint: . When debugging your code, the process pauses at your established breakpoints, so that you can inspect closely what's going on in a certain part of the code. You can click on the breakpoint list to view all the breakpoints in your workspace. If you click on the checkbox, you can enable or disable a breakpoint as well. You can also click on a breakpoint in the gutter to disable or enable it.
-
-
-
-
While debugging, you also have the power of the live inspector. While hovering over a piece of code in the editor, you'll instantly get some floating text that describes the values of that variable, similar to Variable Inspection.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
Searching and Replacing in Files
-
-
-
-
-
Aside from Goto File and Goto Definition, Cloud9 also offers more traditional search functionality. There are three types of search modes available: quicksearch, search and replace, and find in files.
-
Quicksearch
-
Quicksearch can be activated by hitting Cmd-F on a Mac, or Ctrl-F on a Unix/Windows machine. As you type in the quicksearch bar, the IDE instantly shifts to the next available result. This is a great way to quickly search around in your code without hassle.
-
Quicksearch offers the following options:
-
-
Regular Expressions: when enabled, your search is treated as a regular expression
-
Match Case: when enabled, your search takes capitalizations seriously:
-
Whole Words: when enabled, your search will only be considered for whole words:
-
Search Backwards: when enabled, the search goes backwards, instead of forwards
-
Wrap Around: when enabled, the search loops around the file, from bottom to top
-
Search Selection: when enabled, the search only considers code that you've currently highlighted
-
-
Search and Replace
-
Building on the features of quicksearch, search and replace allows you to replace segments of code in your file. You can again continue to use regular expressions, keeping in mind the groupings are prefixed with a dollar sign, i.e.$1.
-
Replacing offers two more options:
-
-
Preserve Case: if enabled, case is preserved while replacing content
-
Highlight Matches: if enabled, the new replaced matches are highlighted in the document
-
-
Find in Files
-
In order to search across a set of files, you'll want to use the Find in Files feature. Here, you can search of a string or regular expression, within your entire workspace or a single directory. You can also filter based on extensions, like *.js or *.rb.
-
Find in files offers some of the same search options as quicksearch:
-
-
Regular Expressions: when enabled, your search is treated as a regular expression
-
Match Case: when enabled, your search takes capitalizations seriously
-
Whole Words: when enabled, your search will only be considered for whole words
-
-
One more feature of find in files is the ability to render search results either in the console or the IDE. You can fold results to keep them out of the way, or, edited the file if you're working down a list:
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
Setting Up a Bitbucket Workspace
-
Bitbucket is a code-hosting services that offers both git and mercurial support. Projects can be listed as private or public, absolutely free. For more information on Bitbucket, visit https://bitbucket.org.
-
We have integrated Bitbucket into the IDE to enable you to easily work on your public and private repositories. The following article explains how you can activate your Bitbucket account in Cloud9 IDE.
-
Bitbucket Activation
-
You can manage your add-on services from your user profile that you can find in the dashboard. When you have just signed in, click Your Account on the top of the left-side panel. Here, you can change the settings of your account. At the bottom, you'll see a list of add-on services that are integrated into Cloud9 IDE. Click activate on the Bitbucket button:
-
-
A new window will pop-up on your screen. This window asks you to give authorization permission for the Cloud9 IDE application to interact in various ways with Bitbucket:
-
-
To finalize the activation, click on Allow. Next, you're redirected to your account page, where you'll notice that your Bitbucket account is activated. You can deactivate Bitbucket by simply clicking deactivate, which may be useful when you want to link your Bitbucket account to another Cloud9 account.
-
Now that you have activated Bitbucket, you can start to create and manage your projects!
-
Managing Projects
-
There are several ways to manage Bitbucket projects in Cloud9 IDE:
-
-
By creating a new git or mercurial project and pushing it to Bitbucket
-
By cloning a Bitbucket project from a URL
-
By bringing in a Bitbucket project manually
-
-
Creating a New Git Project
-
New projects are created from the dashboard. In the left-side panel, click on the to add a new project:
-
-
A new window will pop-up in which you can change your settings to your preferences:
-
-
Fill in your preferred project name in the text field
-
Choose who will have access to the project (a feature for Premium customers)
-
Select your project type (git, mercurial, or FTP)
-
Choose a development server (a feature for Premium customers)
-
-
-
After you click CREATE, the project is listed in your dashboard. Select the project to see its Project Profile, where you can start editing:
-
There are a couple of things you should do first, before you can use all of git's power. First, you'll want to add a remote to the project. From the Cloud9 IDE command line, you can execute the following commands:
-
git remote add [remote name] [remote url]
-
remote url is the location of the project on Bitbucket; for example 'origin git@bitbucket.org:username/repository_name.git'. You'll have to create a Bitbucket project first in order to generate this URL. Adding a remote URL lets you freely push and pull your project.
-
Next, create a few new files inside your project. By default, you should already have a README.md. You can add these files to git with the following command:
-
git add [file1, file2, file3, ...]
-
Finally, create a commit that you can push to your remote:
-
git commit -m 'added new files'
-
Don't forget to push this commit out to Bitbucket:
-
git push [remote name] master
-
Ta-da! Your project is developed on Cloud9, and stored in Bitbucket.
-
Cloning Projects from a URL
-
You can also create a project in Cloud9 IDE by cloning it from a URL. Once again, click on the , and select Clone from URL. A new window pops up, asking you:
-
-
to enter a Source URL
-
to choose who will have access to the project (Premium feature)
-
to choose a development server (Premium feature)
-
-
-
You can find an examples of a Bitbucket URL on any of their repo description pages:
-
-
Paste the URL in the source field and click CHECKOUT. In the left-side panel, you'll see the project and its status turn into "Cloning in Progress". When this process is completed you can open the project and start editing it, just like any other project.
-
Clone Projects Already On Bitbucket
-
When you provide Cloud9 IDE with your Bitbucket credentials, it provides a list of projects you haven't yet imported into the editor:
-
-
From this list, clicking on a project and selecting CLONE TO EDIT brings the repo into the IDE, just as if you cloned it from a URL.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
Setting Up a GitHub Workspace
-
GitHub is a code hosting service which offers you a lot of features to manage your public and private git repositories. For more information about GitHub and how to use it, visit https://github.com.
-
We have integrated GitHub into the IDE to enable you to easily work on your public and private Git repositories. The following article explains how you can activate your GitHub account in Cloud9 IDE.
-
GitHub Activation
-
You can manage your add-on services from your user profile that you can find in the dashboard. When you have just signed in, click Your Account on the top of the left-side panel. Here, you can change the settings of your account. At the bottom, you'll see a list of add-on services that are integrated into Cloud9 IDE. Click activate on the GitHub button:
-
-
A new window will pop-up on your screen. This window asks you to give authorization permission for the Cloud9 IDE application to interact in various ways with GitHub:
-
-
To finalize the activation, click on Allow. Next, you're redirected to your account page, where you'll notice that your GitHub account is activated. You can deactivate GitHub by simply clicking deactivate, which may be useful when you want to link your GitHub account to another Cloud9 account.
-
Now that you have activated GitHub, you can start to create and manage git projects!
-
Managing Git Projects
-
There are several ways to manage GitHub projects in Cloud9 IDE:
-
-
By creating a new git project and pushing it to GitHub
-
By cloning a GitHub project from a URL
-
By bringing in a GitHub project manually
-
-
Creating a New Git Project
-
New projects are created from the dashboard. In the left-side panel, click on the to add a new project:
-
-
A new window will pop-up in which you can change your settings to your preferences:
-
-
Fill in your preferred project name in the text field
-
Choose who will have access to the project (a feature for Premium customers)
-
Select your project type (git, mercurial, or FTP)
-
Choose a development server (a feature for Premium customers)
-{: #setupOptions}
-
-
-
Select git as your project type. After you click CREATE, the project is listed in your dashboard. Select the project to see its Project Profile, where you can start editing:
-
There are a couple of things you should do first, before you can use all of git's power. First, you'll want to add a remote to the project. From the Cloud9 IDE command line, you can execute the following commands:
-
git remote add [remote name] [remote url]
-
remote url is the location of the project on GitHub; for example 'git@github.com:/ajaxorg/node_chat'. You'll have to create a GitHub project first in order to generate this URL. Adding a remote URL lets you freely push and pull your project.
-
Next, create a few new files inside your project. By default, you should already have a README.md. You can add these files to git with the following command:
-
git add [file1, file2, file3, ...]
-
Finally, create a commit that you can push to your remote:
-
git commit -m 'added new files'
-
Don't forget to push this commit out to GitHub:
-
git push [remote name] master
-
Ta-da! Your project is developed on Cloud9, and stored in GitHub.
-
Cloning Projects from a URL
-
You can also create a project in Cloud9 IDE by cloning it from a URL. Once again, click on the , and select Clone from URL. A new window pops up, asking you:
-
-
to enter a Source URL
-
to choose who will have access to the project (Premium feature)
-
to choose a development server (Premium feature) {: #cloningOptions}
-
-
-
You can find an examples of a GitHub URL on any of their repo description pages:
-
-
Paste the URL in the source field and click CHECKOUT. In the left-side panel, you'll see the project and its status turn into "Cloning in Progress". When this process is completed you can open the project and start editing it, just like any other project.
-
Clone Projects Already On GitHub
-
When you provide Cloud9 IDE with your GitHub credentials, it provides a list of projects you haven't yet imported into the editor:
-
-
From this list, clicking on a project and selecting CLONE TO EDIT brings the repo into the IDE, just as if you cloned it from a URL.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
MySQL
-
MySQL is the world's most widely used open source relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases.
-
MySQL's most common features
-
-
A broad subset of ANSI SQL 99, as well as extensions
Cloud9 IDE does not support installing a MySQL database (yet). As a workaround you can choose to connect your project to a MySQL database hosted elsewhere. Xeround
-offers hosted MySQL instances and have a free tier available for getting started.
-
Xeround
-
-
Register with Xeround
-
Log in to your controlpanel
-
Choose 'create new'
-
Choose a datacenter
-
Enter your Database name, Username and Password and create
-
Select your newly created instance and click the 'External DNS Hostname' link provided to log into PHPMyAdmin
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
MongoDB
-
MongoDB is a scalable, high-performance, open source NoSQL database.
-
MongoDB's most common features
-
-
Document-Oriented Storage
-JSON-style documents with dynamic schemas offer simplicity and power.
-
-
Full Index Support
-Index on any attribute, just like you're used to.
-
-
Querying
-Rich, document-based queries.
-
-
-
In addition, MongoDB has many scalability features such as:
-
Replication, Auto-sharding, Map/Reduce and GridFS
-
Running MongoDB on a Cloud9 workspace
-
MongoDB is preinstalled in your workspace. To run MongoDB, run the following below (passing the correct parameters to it). Mongodb data will be stored in the folder data.
You can start mongodb by running the mongod script on your project root:
-$ ./mongod
-
MongoDB parameters used:
-
| Parameter | Description |
-| ------------------------------ | ----------------------------------------------------------------------------------------------- |
-| --dbpath=data | Because it defaults to /var/db which isn't accessible) |
-| --nojournal | Because mongodb usually pre-allocates 2 GB journal file (which exceeds Cloud9 disk space quota) |
-| --bind_ip=$IP | Because you can't bind to 0.0.0.0) |
-| --rest | Runs on default port 28017 |
-
Drivers
-
You should use the host $IP instead of localhost as your driver connection url.
-e.g. in Node, it is: process.env.IP
-
MongoDB has drivers for all supported runtimes. Following are the most commonly used drivers:
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
MySQL
-
MySQL is the world's most widely used open source relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases.
-
MySQL's most common features
-
-
A broad subset of ANSI SQL 99, as well as extensions
This article explains our first iteration of MySQL support in Cloud9. It makes it super easy to install, start and stop a MySQL instance right in your workspace. The nice thing is that every workspace will run a separate database so your projects will never interfere with each other. You can control MySQL with the mysql-ctl command line tool run from the terminal:
-
# start MySQL. Will create an empty database on first start
-$ mysql-ctl start
-
-# stop MySQL
-$ mysql-ctl stop
-
-# run the MySQL interactive shell
-$ mysql-ctl cli
-
You can then connect to the database with following parameters:
-
-
-
-
Option
-
Value
-
Comment
-
-
-
-
-
Hostname
-
$IP
-
The same local IP as the application you run on Cloud9
-
-
-
Port
-
3306
-
The default MySQL port number
-
-
-
User
-
$C9_USER
-
Your Cloud9 user name
-
-
-
Password
-
-
-
No password since you can only access the DB from within the workspace
-
-
-
Database
-
c9
-
The database name
-
-
-
-
Importing data into your database
-
To import existing data into your database run following commands:
-
mysql-ctl cli
-
You are now in the MySQL environment and can start the import:
-
mysql> use c9
-mysql> source PATH_TO_SQL_FILE.sql
-
To verify that everything got imported run:
-
mysql> show tables;
-
Note:
MySQL socket file can be found in ~/lib/mysql/socket/mysql.sock
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
SQLite
-
SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world. The source code for SQLite is in the public domain.
-
Note:
SQLite supports full text search and ACID transactions (atomic, consistent, isolated, and durable)
-With its simplicity and zero-configuration, SQLite is a popular choice for new applications.
-
-
-
Getting started
-
You can open the terminal and create a database in a file db_test.db as follows:
-
-
Try yourself
-
$ sqlite3 db_test.db
-SQLite version 3.6.20
-Enter ".help" for instructions
-Enter SQL statements terminated with a ";"
-sqlite> create table tbl1(one varchar(10), two smallint);
-sqlite> insert into tbl1 values('hello!',10);
-sqlite> insert into tbl1 values('goodbye', 20);
-sqlite> select * from tbl1;
-hello!|10
-goodbye|20
-sqlite> CREATE TABLE tbl2 (
- ...> f1 varchar(30) primary key,
- ...> f2 text,
- ...> f3 real
- ...> );
-sqlite> .exit
-
To get to know sqlite commands, use the command: .help.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
Share a workspace
-
As you develop your application, often you just want to quickly demo your work-in-progress to a colleague, customer, or friend.
-Or you 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...
-
-
Here's what you see when you pull up the Share dialog:
-
-
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.
-
Share your development environment
-
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.
-See the screenshot below for what this looks like:
-
-
In order to share your entire development environment, do one of the following:
-
-
Make the URL publicly available to everyone: check the "Public" checkbox for the "Editor" in the "Links to Share" section.
-
Choose to share only with specific people: invite them from the "Invite people" section.
-
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.
-
Note:
alternatively you can just share the URL to your running app from the Preview panels' URL bar
-
-
-
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.
-
Note:
alternatively you can just share the URL to your Preview from the Preview panels' URL bar
-
-
-
Tip:
If you can't find how to preview your running app, try to use port 8080 in the URL.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
SSH Workspaces
-
To connect Cloud9 to a server via SSH, we first need to install a few dependencies on your system.
-This is done by an open-source installer which you can find here.
-
Usually the installation should succeed without any issues, but on some systems you will need to install a few dependencies manually. See below for common dependency issues you might run into.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Status Bar
-
Note:
this feature is deprecated
-
-
-
The status bar is designed to provide you with all sorts of information about your code--and additional functionality--without getting in the way of the IDE. It's quite tiny, and quite powerful, like a weight-lifting squirrel.
-
You can find the status bar in the lower-right corner of the editor: . Keep in mind that the status bar is transparent, so it's able to camoflauge well with light or dark themes.
-
There's three pieces of crucial information available at all times: your current row, your current column, and, if you're highlighting characters, the status bar displays the number of bytes currently selected. If you're using Vim Mode, the status bar also tells you if you're in INSERT mode.
-
If you click on the status bar, it expands into a menu that provides a smaller set of the full IDE preferences. These options only deal with the IDE editor:
-
-
-
-
Preference Name
-
Description
-
-
-
-
Show Invisibles
-
Shows invisibles characters in the editor, like tabs and line breaks
-
-
-
Wraps Lines
-
Wraps lines according to the line margin defined, or your browser's window. Otherwise, lines run off the current viewport.
-
-
-
Code Folding
-
When enabled, allows you to show or hide "blocks" of code
-
-
-
Full Line Selection
-
When highlighting lines, this option will highlight all ending whitespace, until the end of the editor window
-
-
-
Highlight Active Line
-
Presents a darker shade in the code editor to indicate which line you're currently on
-
-
-
Show Indent Guides
-
Shows the indent guides in the editor, letting you see your code's nestings
-
-
-
Show Gutter
-
Shows the gutter in the editor, which indicates line numbers, warnings, and errors
-
-
-
Highlight Selected Word
-
If you highlight a word, this highlights all matching words in the editor
-
-
-
Auto-pair Quotes, Brackets, etc.
-
When enabled, typing ", (, or [ will actually make two characters appear. In addition, whenever you highlight a word and type one of these characters, it is surrounded by that character (e.g. words becomes "words")
-
-
-
Auto-hide Horizontal Scrollbar
-
hen this is enabled, this will hide the horizontal scroll bar in the editor. Note that this has no effect in Mac OS X 10.7 (Lion) and above, since all scrollbars, by default, auto-hide.
-
-
-
Font Size
-
Changes the font size of the code in the editor
-
-
-
Show Print Margin
-
Shows (and defines) the number of characters possible in line, before it wraps
-
-
-
Soft Tabs
-
Indicates how many spaces a single tab represents
-
-
-
Mouse Scroll Speed
-
Defines the speed of the mouse scrolls
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/supported_languages.html b/out/supported_languages.html
deleted file mode 100644
index 3453f8d..0000000
--- a/out/supported_languages.html
+++ /dev/null
@@ -1,251 +0,0 @@
-
-
-
-
-
- Supported Languages | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
Supported Languages
-
Cloud9 IDE has varying levels of support for different programming languages.
-Usually you will at least have Syntax Highlighting in the editor and the ability
-to run apps from the Terminal.
-
Syntax Highlighting
-
Cloud9 IDE develops and builds on Ace, an
-editor for writing code online. Cloud9's Ace editor currently supports
-highlighting for about 100 programming languages, and any changes made to Ace are
-reflected back into Cloud9 IDE.
-
The list of supported languages is growing, and you can get the full list from
-the View>Syntax menu. Feel free to create an issue in the Ace repository
-for new requests, or add your own syntax highlighting mode.
The Run panel currently supports running the following by default:
-
-
Apache httpd (PHP, HTML)
-
Node
-
Python
-
Ruby
-
Ruby on Rails
-
Go
-
CoffeeScript
-
Julia
-
Mocha
-
Shell script
-
-
If you'd like to run any other language, simply create a new "Runner".
-
You can also do so from the Terminal.
-Each workspace is an Ubuntu VM with the standard tools like bash, make,
-gcc, vim, java SDK or perl pre-installed.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Syntax Higlighting and Themes
-
-
-
Cloud9 IDE develops and builds on Ace, an editor for writing code online. Ace supports over two dozen different themes for highlighting your code, and any changes made to Ace are reflected back into Cloud9 IDE.
-
You can change your current theme by going to View>Themes, and selecting from one of the many options. By hovering over the menu items, you'll be able to get a preview of the theme. To activate a theme you like, just click on its name.
-
The IDE contains the following themes:
-
-
Chrome
-
Clouds
-
Clouds Midnight
-
Cobalt
-
Crimson Editor
-
Dawn
-
Eclipse
-
Idle Fingers
-
Kr Theme
-
Merbivore
-
Merbivore Soft
-
Mono Industrial
-
Monokai
-
Pastel On Dark
-
Solarized Dark
-
Solarized Light
-
TextMate
-
Tomorrow
-
Tomorrow Night
-
Tomorrow Night Blue
-
Tomorrow Night Bright
-
Tomorrow Night Eighties
-
Twilight
-
Vibrant Ink
-
-
By default, files are highlighted based on their file extension. You can change this by going to View>Syntax, and selecting a different context. This forces a single file to use a different highlighter.
-
We support highlighting for at least the following languages, and many more:
-
-
CoffeeScript
-
ColdFusion
-
C#
-
CSS
-
Go
-
Groovy
-
haXe
-
HTML
-
C/C++
-
Clojure
-
Java
-
JavaScript
-
JSON
-
LaTeX
-
LESS
-
Liquid
-
Lua
-
Markdown
-
OCaml
-
Perl
-
pgSQL
-
PHP
-
Powershell
-
Python
-
Ruby
-
OpenSCAD
-
Scala
-
SCSS
-
SH
-
SQL
-
SVG
-
Text
-
Textile
-
XML
-
XQuery
-
YAML
-
-
We are always adding new themes and new languages to support, so check the menu often! Since we use Ace to provide syntax highlighting, feel free to log an issue there for new requests.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/tab_functions.html b/out/tab_functions.html
deleted file mode 100644
index d554eda..0000000
--- a/out/tab_functions.html
+++ /dev/null
@@ -1,230 +0,0 @@
-
-
-
-
-
- Tab Functions | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
Tab Functions
-
Note:
this article is outdated, a new version will follow soon
-
-
-
Cloud9 IDE offers advanced tab features to make working with multiple files easy. By right-clicking on any tab, you'll open up the tab context menu:
-
-
These feature include:
-
-
Reveal in File Tree: opens the current file in the Project Files tree
-
Close Tab: closes the current tab
-
Close All Tabs: closes all the opened files
-
Close All But Current Tab: closes all the opened files, except the current one
-
Close Tabs to the Right/Left: closes all opened tabs to the right (or left) of the current one
-
File Revision History...: launches the revisions panel
-
-
To the left of the tab menu is another button that offers additional functions for tab navigation:
-
Tab Sessions
-
-
-
-
-
Tab sessions is a unique feature that is useful when dealing with projects that involve juggling between many tabs. Essentially, tab sessions lets you save the current state of the tabs. You can close your workspace, switch to a different branch, and instantly reload your previously opened files. You'll no longer need to work with opening and closing multiple files.
-
To use tab sessions, select Save Tab Sessions from the tab button menu. Give it a unique name. When you're ready to restore your tab sessions, just select Load Tab Sessions.
-
If you find that you've got too many tab sessions defined, you can always choose to delete them from the same tab menu.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Terminal
-
Note:
this article is outdated, a new version will follow soon
-
-
-
The terminal provides you with a TTY interface for direct access to the machine that Cloud9 is running on. If you're running your own workspace, this is the server you've SSH'ed into. If you're using the hosted Cloud9 platform, this is the server your code runs on.
-
Warning:
While certain operations, like sudo, are restricted, you can completely destroy your workspace, by doing something like rm -rf. Use your power wisely!
-
-
-
To create a new terminal, go to View>Terminals>New Terminal, or simply type Alt-T on the keyboard. The terminal has the following capabilities:
-
-
Perform all Unix commands
-
You can create more than one instance of a terminal (by just creating a new tab)
-
The terminal allows for path autocompletion by hitting Tab
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/terminal_monitor.html b/out/terminal_monitor.html
deleted file mode 100644
index 95057a5..0000000
--- a/out/terminal_monitor.html
+++ /dev/null
@@ -1,211 +0,0 @@
-
-
-
-
-
- The Terminal Monitor | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
The Terminal Monitor
-
Many times your app returns errors which are hard to understand and even harder to resolve. This is where the Terminal Monitor comes in.
-The following video gives a quick overview of the features and how the Terminal Monitor helps you write better apps.
-
-
-
If you would like to propose additions or help which Terminal Monitor should provide, please send a message to support@c9.io
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/the_editor.html b/out/the_editor.html
deleted file mode 100644
index 28682f5..0000000
--- a/out/the_editor.html
+++ /dev/null
@@ -1,237 +0,0 @@
-
-
-
-
-
- The Editor | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
The Editor
-
The editor is the most important element of any IDE; that's why Cloud9 developed ACE. ACE is a high-performance code editor for the web that supports over 40 different languages, over two dozen themes, and can still work faithfully on large documents (at last count, four million lines of code was the upper limit). It also contains a bevy of features you'd expect from traditional desktop editors. Among these include:
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Uploading and Downloading Workspace Files
-
Cloud9 IDE allows you to easily add files to your curent workspace at any time. You can drag and drop files from your computer directly into the Project Files pane, and the IDE will add them to your project. Google Chrome users can also drag entire folders into the IDE.
-
If a file transfer is halted for some reason--say, if you lose your internet connection--the upload resumes once the connection returns. As the files transfer, the IDE lets you know the current status of the overall transfer, as well as the status of each file being uploaded:
-
-
You can also get an exact copy of your workspace to save on your computer. By going into File>Download Project, you will be provided with a Zip file containing the entirety of your project.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/writing_a_go_app.html b/out/writing_a_go_app.html
deleted file mode 100644
index be44629..0000000
--- a/out/writing_a_go_app.html
+++ /dev/null
@@ -1,255 +0,0 @@
-
-
-
-
-
- Writing a Go App | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
Writing a Go App
-
Cloud9 IDE doesn't provide out-of-the-box support for the Go language, but with
-a few quick steps you can set up Cloud9 to build and run apps in Go!
-
Create a new workspace
-
First, create a new Custom workspace and call it whatever you want:
-
-
After your new workspace is created, click the "start editing" button. At the
-bottom of your workspace you will see the Terminal. If you prefer to have it
-fullscreen, you can launch a terminal tab by pressing Alt-T, or from the menu:
-View>Terminals>New Terminal.
-
From the terminal you can install & setup everything on the underlying virtual
-environment that every workspace is provided with.
-
Download Go
-
When you first enter your Terminal, you will be in your workspace root folder,
-which is a number such as ~/562166. Make a note of this directory name, as
-you'll need it later.
-
Let's use your home directory to download the Go distribution; to get there,
-simply enter the following in the Terminal:
-
cd ..
-
To download the Go distribution enter the following:
at the time of writing the latest version was 1.1.1, but you might want to
-use a new version if it has become available.
-
-
-
After the download is complete, extract the archive:
-
tar -xzf go1.1.1.linux-amd64.tar.gz
-
Once the extraction is done, you will notice a new go directory in your home
-directory. Feel free to delete the archive file you downloaded.
-
Set up your environment
-
The last step is to configure the environment so it can see the Go distribution
-as well as our workspace Go files. To do this, edit your bash configuration
-in the Terminal using vim (or emacs, nano, any simple editor will do):
-
vim ~/.bashrc
-
Add the following lines to your .bashrc file:
-
# setup go configuration
-export GOROOT=$HOME/go
-export PATH=$PATH:$GOROOT/bin
-
-# setup workspace t
-export GOPATH=$HOME/562166
-export PATH=$PATH:$GOPATH/bin
-
Update the GOPATH line above to use the workspace directory you noted earlier
-(so don't use $HOME/562166).
-
After you save your .bashrc file, load the new settings:
-
source ~/.bashrc
-
That's it! You should be good to Go (pun intended).
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Writing a Python App
-
While using Cloud9 IDE, you have access to the Python runtime. Accessing the command is no different than the way you'd use Python on your computer; just open the command line and type python. Currently, we run version 2.6.6.
-
To run a Python program that you've created, you can either:
-
-
Open the command line and type python, followed by the name of your program; for example python hello_world.py
-
Create a new run scenario, so that you can do things like pass in command line arguments
-
-
As a quick demonstration, open a new file, and paste this Python code into it:
-
#!/usr/bin/python
-
-print"Hello World!";
-
When you hit the button in the menu bar, the console will print out Hello World!.
-
Note:
Currently, you can't debug Python applications, but we are working on adding this feature.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/out/writing_a_ruby_app.html b/out/writing_a_ruby_app.html
deleted file mode 100644
index 1c4ae73..0000000
--- a/out/writing_a_ruby_app.html
+++ /dev/null
@@ -1,235 +0,0 @@
-
-
-
-
-
- Writing a Ruby App | Cloud9 User Documentation
-
-
-
-
-
-
-
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
Writing a Ruby App
-
While using Cloud9 IDE, you have access to the Ruby runtime. Accessing the command is no different than the way you'd use Ruby on your computer; just open the command line and type ruby. Currently, the default version is 1.9.3.
-
To run a Ruby program that you've created, you can either:
-
-
Open the command line and type ruby, followed by the name of your program; for example ruby hello_world.rb
-
Create a new run scenario, so that you can do things like pass in command line arguments
-
-
As a quick demonstration, open a new file, and paste this Ruby code into it:
-
#!/usr/bin/ruby
-
-puts 'Hello world'
-
When you hit the button in the menu bar, the console will print out Hello world.
-
Note:
Currently, you can't debug Ruby applications, but we are working on adding this feature.
-
-
-
RVM Support
-
We have rudimentary support for rvm, that allows you only to switch between versions 1.8.7 and 1.9.3. We don't support rvm per-project or global gemsets.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
-
Writing and Running a Node.js Program
-
Cloud9 IDE was built on top of the Node.js platform, and as such, you have full access to the node runtime. Currently, we support running both version v0.6.x and v0.8.x.
-
In this section, we'll walk you through the creation of a simple Hello World program. To get started, you'll first need to create a (GitHub or Mercurial) project. If you need a refresher on how to do this, please refer to Creating a New Workspace.
-
A Simple Node.js HTTP Server
-
Once you're in Cloud9, create a new file called server.js. Type the following code in the file:
This is a Node.js HTTP server. It returns a simple "Hello World" page every time you access the page. In short, you are creating an HTTP server with a callback function that is called for each request.
-
In the callback function, you create a response with a status code of 200 (indicating that the request was fulfilled successfully) and the message "Hello World". Finally, you specify which port and IP address the server runs on. When Cloud9 IDE runs servers, you set and retrieve the IP address and port number with the process.env.IP and process.env.PORT variables.
-
When you hit the button in the menu bar, the console will print out the following message:
-
To see your application in action, click on the link created for your project. You should see your "Hello World" application open up in a new browser tab: .
-
NVM Support
-
We have rudimentary support for nvm, that allows you only to switch between Node.js versions 0.6.21 and 0.8.x.
These articles are open source! Feel free to pull and contribute.
-
-
-
-
-
-
-
Activating Zen Mode
-
Note:
this feature is deprecated
-
-
-
-
-
-
-
Zen mode is a full screen coding environment designed to make you more productive. It essentially removes all the additional UI elements in Cloud9 IDE, and places you in a harmonious relationship with your code.
-
To activate zen mode, simply hover over the upper right corner of the code editor, and click the icon that appears. Keep in mind that you'll need to have a file open before you can launch zen mode. You can resize your window by holding and dragging the left or right border.
-
To get out of zen mode, hover over the same corner and click the same icon.
-
You can also enter and exit zen mode via keyboard shortcuts, command line, or from the menu bar at View>Zen Mode.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/package.json b/package.json
index 7fabf16..80be1d8 100755
--- a/package.json
+++ b/package.json
@@ -2,6 +2,7 @@
"name": "docs.c9.io",
"version": "0.1.70",
"private": true,
+ "license": "CC-BY-NC-SA-3.0",
"repository": {
"type": "git",
"url": "git://github.com/c9/docs.c9.io.git"
diff --git a/recentFiles.json b/recentFiles.json
index 20f4440..29f5ebf 100644
--- a/recentFiles.json
+++ b/recentFiles.json
@@ -1 +1 @@
-[{"filename":"faq_general","mtime":1416998245000,"pageTitle":"FAQ: General"},{"filename":"faq_ssh","mtime":1416998221000,"pageTitle":"FAQ: SSH workspaces"},{"filename":"frameworks_drupal","mtime":1416998221000,"pageTitle":"Framework: Drupal"},{"filename":"frameworks_express","mtime":1416998221000,"pageTitle":"Framework: Express"},{"filename":"frameworks_jekyll","mtime":1416998221000,"pageTitle":"Framework: Jekyll"}]
\ No newline at end of file
+[{"filename":"running_python_cgi","mtime":1424257208000,"pageTitle":"Running a Python CGI server"},{"filename":"ide_preferences","mtime":1422860320000,"pageTitle":"IDE Preferences"},{"filename":"faq_python","mtime":1422860320000,"pageTitle":"FAQ: Python"},{"filename":"faq_ssh","mtime":1422860320000,"pageTitle":"FAQ: SSH workspaces"},{"filename":"faq_php","mtime":1422860320000,"pageTitle":"FAQ: PHP"}]
\ No newline at end of file
diff --git a/resources/images/apacheRunConfiguration.png b/resources/images/apacheRunConfiguration.png
new file mode 100644
index 0000000..cd2ac28
Binary files /dev/null and b/resources/images/apacheRunConfiguration.png differ
diff --git a/resources/images/newRunConfiguration-new.png b/resources/images/newRunConfiguration-new.png
new file mode 100644
index 0000000..897ac7a
Binary files /dev/null and b/resources/images/newRunConfiguration-new.png differ
diff --git a/resources/images/saveRunConfiguration.png b/resources/images/saveRunConfiguration.png
new file mode 100644
index 0000000..e3f7195
Binary files /dev/null and b/resources/images/saveRunConfiguration.png differ
diff --git a/src/deploying/deploying_code.md b/src/deploying/deploying_code.md
index 248dceb..cd64385 100755
--- a/src/deploying/deploying_code.md
+++ b/src/deploying/deploying_code.md
@@ -1,30 +1,22 @@
# Deploying Your Code
-Cloud9 IDE offers many different ways to get your code from your editor to your
-production server. To deploy your code, click on the **Deploy** button in the
-Project Bar:
+Cloud9 IDE makes it easy to deploy to a wide variety of hosting providers
+through their native command line tools.
-![The Deploy button in the Project Bar](./resources/images/deployButton.png)<232, 109>
-We offer tight integration with the following environments:
-
-* [Heroku](deploying_to_heroku.html)
-* [Windows Azure Sites](deploying_to_windows_azure_sites.html)
-
-Following these links will provide you with more information on code deployment.
-You can deploy your code to as many services and servers as you like. Keep in
-mind that you'll already need an account at those hosting providers before you
-can deploy your app to them!
-
-If you're comfortable with the command line, you can also deploy to several more
-environments, such as:
+We have compiled instructions of how to use the following services:
+* [Heroku](./deploying_via_cli.html#heroku)
+* [Windows Azure Cloud Services](./deploying_via_cli.html#windows-azure-web-sites)
* [Windows Azure Cloud Services](./deploying_via_cli.html#windows-azure-cloud-services)
* [Google App Engine](./deploying_via_cli.html#google-app-engine)
* [CloudFoundry](./deploying_via_cli.html#cloudfoundry)
* [NodeJitsu](./deploying_via_cli.html#nodejitsu)
* [Modulus](./deploying_via_cli.html#modulus)
+Keep in mind that you'll already need an account at those hosting providers before you
+can deploy your app to them!
+
Warning: Before you attempt to deploy your application, make sure that you have
committed all your changes to version control. Cloud9 deploys for you whatever
was last committed to version control.
\ No newline at end of file
diff --git a/src/deploying/deploying_to_heroku.md b/src/deploying/deploying_to_heroku.md
deleted file mode 100755
index 1859a9b..0000000
--- a/src/deploying/deploying_to_heroku.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# Deploying to Heroku
-
-This section will show you how to deploy your applications to Heroku, a cloud-based application platform. The integration with Cloud9 IDE makes your development process even more agile. If you don't have a Heroku account, visit [their website](http://www.heroku.com) to create one for free.
-
-To get started, create a simple Node.js application. If you don't have one yet, you can [follow our tutorial](writing_nodejs_hello_world.html) on developing one.
-
-After you click on the **Deploy** button in the Project Bar, click the plus sign next to Deploy to add another deploy target. Choose Heroku as an option. After you have signed into your Heroku account, you can create a new deploy target or choose an existing one from your account:
-
-![Showing the Deploy button](./resources/images/herokuDeploy.png)<369, 407>
-
-Note: Heroku only allows you to create names for your apps that contain letters and dashes.
-
-Next, press **Deploy** to continue the process; the following window might appear:
-
-![Dialog requesting a package JSON file](./resources/images/missingPackageJSON.png)<522, 178>
-
-Heroku Node.js apps [are required to have a package.json file](http://devcenter.heroku.com/articles/nodejs-versions), much like with NPM. Cloud9 can generate a _package.json_ file for you, containing metadata to share Heroku. The following lines represent what that file might looks like:
-
- {
- "name": "cloud9-heroku-example",
- "version": "0.0.1"
- }
-
-After you have a _package.json_ file, you might see this dialog:
-
-![Dialog requesting a Procfile](./resources/images/missingProcFile.png)<519, 198>
-
-[Sometimes, a Heroku app also requires a Procfile](http://devcenter.heroku.com/articles/node-js#declare_process_types_with_foremanprocfile). The Procfile is needed to start the application in Heroku. You can just create a new file, add the line below, and save it as 'Procfile'. Don't add any file extensions.
-
- web: node web.js
-
-Try the deploy button again. The console will directly output the following when the deployment is completed:
-
-![Console output for Heroku](./resources/images/herokuConsoleOutput.png)<656, 374>
-
-And just like that, you've deployed your project to Heroku.
\ No newline at end of file
diff --git a/src/deploying/deploying_to_windows_azure_sites.md b/src/deploying/deploying_to_windows_azure_sites.md
deleted file mode 100755
index 8b86aef..0000000
--- a/src/deploying/deploying_to_windows_azure_sites.md
+++ /dev/null
@@ -1,32 +0,0 @@
-# Deploying to Windows Azure Sites
-
-This article will show you how to deploy your applications to Windows Azure. If you don't have an account yet, the Windows Azure process will help you create one. Keep in mind that Windows Azure is not free, though it does come with a free trial. Windows Azure projects can be deployed from any operating system.
-
-To get started, create a simple Node.js application. If you don't have one yet, you can [follow our tutorial](writing_nodejs_hello_world.html) on developing one.
-
-After you click on the **Deploy** button in the Project Bar, click the plus sign next to Deploy to add another deploy target. Choose Windows Azure as an option. You'll be prompted with this dialog:
-![Windows Azure asking for publisher settings](./resources/images/windowsAzureDialog.png)<348, 403>
-
-You must click on the **Download Windows Azure Settings** button before you can continue. If you don't have a Windows Azure account, here is where you can create one. If you _do_ have an account, your browser will automatically download the required file.
-
-When that's finished, simply select the downloaded file from your computer, and upload it to Cloud9. You'll only have to do this process once. If you ever need to upload a new certificate, be sure to click **Clear cert** in the lower-right corner of this dialog.
-
-After the file has uploaded, click on **Create new** to create a new hosted service. A hosted service is the container in which your application is hosted when it is deployed to Windows Azure. For more information, see [Overview of Creating a Hosted Service for Windows Azure](http://msdn.microsoft.com/en-us/library/windowsazure/gg432976.aspx).
-
-You can set a few configuration options such as the number of instances to use, its host OS, and where the data center is located. Selecting "Enable RDP" and providing a username and password enables remote desktop for your deployment.
-
-Your new Windows Azure server will appear in the Deploy list:
-![Windows Azure information](./resources/images/windowsAzureInfo.png)<234, 219>
-
-Go ahead and click on **DEPLOY**. If this is the first time you're trying to deploy this project to Windows Azure, you'll receive three prompts:
-
-1. A dialog will inform you of a missing web.config file. If you click **Yes**, Cloud9 will create a file called _Web.cloud.config_ in your project. This file contains [configuration information](http://en.wikipedia.org/wiki/Web.config) about your app.
-
-2. You'll be told about a missing csdef file. If you click **Yes**, Cloud9 will create a file called _ServiceDefinition.csdef_ in your project. ServiceDefinition.csdef is a Windows Azure-specific files necessary for publishing your application For more information, see [Overview of Creating a Hosted Service for Windows Azure](http://msdn.microsoft.com/en-us/library/windowsazure/gg432976.aspx).
-
-3. You'll be asked to select the instance size for this application. For this tutorial, just select Small, and then click **Create**. For more details about Windows Azure VM sizes, see [How to Configure Virtual Machine Sizes](http://msdn.microsoft.com/en-us/library/windowsazure/ee814754.aspx).
-
-Your app will now deploy to a Windows Azure server! You can follow its progress in the Deploy panel, or by watching the messages in the console:
-![Windows Azure staging messages](./resources/images/windowsAzureStagingOutput.png)<825, 199>
-
-For more information on configuring your app on the Windows Azure website, see [Deploying a Windows Azure App from Cloud9](http://www.windowsazure.com/en-us/develop/nodejs/tutorials/deploying-with-cloud9/).
\ No newline at end of file
diff --git a/src/deploying/deploying_via_cli.md b/src/deploying/deploying_via_cli.md
index 1a4a1cb..74ef5ac 100755
--- a/src/deploying/deploying_via_cli.md
+++ b/src/deploying/deploying_via_cli.md
@@ -19,8 +19,6 @@ If deploying to Heroku, you should probably be using a local instance of Postgre
## Windows Azure Web Sites
-### Free and Premium Plans
-
In [the Console](./console.html) or [a Terminal](./terminal.html), type the
following:
@@ -31,23 +29,6 @@ npm install azure
Now, you can use the `azure` command from the Console/Terminal. For more
information, read [the official `azure` documentation](https://github.com/WindowsAzure/azure-sdk-for-node).
-### Premium Plans
-
-To deploy to Azure sites from the command line, open the Terminal and type:
-
-```bash
-cd ~/lib/azure-sites
-npm install
-```
-
-Then, add the bin to your workspace's path:
-
-```
-PATH=$PATH:$HOME/lib/azure-sites/bin
-```
-
-Now, you can use the `azure` command in the terminal.
-
## Windows Azure Cloud Services
For free and premium plans, follow the instructions on the
@@ -100,17 +81,18 @@ git push master
## CloudFoundry
To deploy to CloudFoundry from the command line in [the Console](./console.html)
-or [a Terminal](./terminal.html), type:
+or [a Terminal](./terminal.html), you need to install the command line tools:
```
cd ~
-wget https://github.com/cloudfoundry/vmc/zipball/master
-mv master cloudfoundry
-unzip cloudfoundry
-cd cloudfoundry-vmc-nnnn
-bundle
+wget -O cf.tgz 'https://cli.run.pivotal.io/stable?release=linux64-binary&source=github'
+tar xvzf cf.tgz
```
+You can now run `cf` from the Console and the Terminal. For more information, see
+[the official `CloudFoundry` documentation](https://github.com/cloudfoundry/cli).
+
+
## NodeJitsu
### Free and Premium Plans
diff --git a/src/faq/faq_general.md b/src/faq/faq_general.md
index 2511b32..864e59e 100644
--- a/src/faq/faq_general.md
+++ b/src/faq/faq_general.md
@@ -1,19 +1,19 @@
# FAQ: General
### Can I use FTP workspaces on Cloud9?
-Yes, Cloud9 supports FTP workspaces that allow you to edit your files directly on your FTP server.
+Yes, Cloud9 supports FTP workspaces that allow you to edit your files directly on your FTP server.
Currently FTP workspaces still open in the old version of Cloud9, but soon we'll also support FTP workspaces with the new version of Cloud9.
One thing that was removed for reliability reasons in the new version of Cloud9, is the ability to deploy over FTP from a regular workspace.
We're bringing back those features in a new format and with much higher reliability in the coming months.
-### How do I deploy to Heroku/Openshift/Azure/...?
+### How do I deploy to Heroku/Openshift/Azure/...?
See [Deploying via CLI](./deploying_via_cli.html).
-### Can I connect to SMTP servers (port 25)?
+### Can I connect to SMTP servers (port 25)?
No, this is not supported by our hosting platform. It does currently allow access to the GMail servers though, so you can use that service during development.
-### My workspace says it's out of quota. how do I fix it?
+### My workspace says it's out of quota. how do I fix it?
You can inspect your current quota usage with the df command in the Terminal:
$ df
@@ -30,10 +30,10 @@ Alternatively, try `du-c9` for seeing all files you added to your workspace and
You can sign into Cloud9 with your github or bitbucket account and set that up to use two-factor authentication.
We don't currently provide an option to directly setup your Cloud9 account for two-factor authentication.
-### I can't preview my running app.
+### I can't preview my running app.
Try using port 8080 instead, which often solves this case.
-### EADDRINUSE: My app complains that the address/port is in use
+### EADDRINUSE: My app complains that the address/port is in use
Applications won't start if another application is already listening to the same port. In order to fix it you first need to find out which process that is:
$ netstat -nlp | grep $PORT
@@ -59,8 +59,8 @@ ensures maximum portability. To open these files, you can use something like
## How can I share a single directory of a private workspace
-Sometime you might want others to open a file or directory in the browser
-without opening up the whole workspace. This can be done by starting a small
+Sometime you might want others to open a file or directory in the browser
+without opening up the whole workspace. 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 "sharing" button at
@@ -70,3 +70,7 @@ To run the server open a terminal and do
$ cd /dir/i/want/to/share
$ python3 -m http.server 8080
+
+## How do I SSH into my workspace?
+
+At the moment, users cannot SSH into their Cloud9 workspaces. You may setup an SSH workspace which will access the files on another SSH server but you cannot SSH into your workspace from another machine.
diff --git a/src/faq/faq_ssh.md b/src/faq/faq_ssh.md
index 369b601..2a12fa4 100644
--- a/src/faq/faq_ssh.md
+++ b/src/faq/faq_ssh.md
@@ -5,10 +5,7 @@
We recently discovered our web host is blocking connections to some Digital Ocean IP addresses because they suspect they are being used by Iranian users. They are legally forced to block them.
-Digital Ocean maintains a whitelist of droplet IP addresses which should not be blocked and our web host follows this list.
-
-Please raise a support ticket with Digital Ocean mentioning that you would like to have your droplet IP added to the whitelist. After this is complete you will be able to create your SSH workspace within 24 - 48 hours.
-
+This issue is the result of an error on Google's GeoDNS and they should be contacted about this if it persists.
### I'm getting an error on the SSH install script: "ncurses not found"
Try executing the following command:
diff --git a/src/features/java_runner.md b/src/features/java_runner.md
new file mode 100644
index 0000000..6dfb2c6
--- /dev/null
+++ b/src/features/java_runner.md
@@ -0,0 +1,53 @@
+# Java Runner
+
+While there are currently no Java builders or runners out of the box, the process of making your own is very quick.
+
+##Creating a Java builder
+
+In the menu, go to Run > Build System > New Build System
+
+You may copy and paste the following code for your Java builder:
+
+```bash
+{
+ "cmd": [
+ "sh",
+ "-c",
+ "mkdir -p $OUT_DIR; find $SRC_DIR -name \"*.java\" -print | xargs javac -sourcepath $SRC_DIR -d \"$OUT_DIR\"; echo '\\033[01;34mDone!\\033[00m'"
+ ],
+ "info": "\\033[01;34mBuilding\\033[00m \\033[01;31m$project_name\\033[00m",
+ "env": {"OUT_DIR": "$project_path\\.bin", "CLASSPATH" : "$OUT_DIR:$CLASSPATH", "SRC_DIR": "src"},
+ "selector": "source.java",
+ "working_dir": "$project_path"
+}
+```
+
+This code builds .java files from the src/ directory. If you are using a different directory to store your .java files, change the `SRC_DIR` to match that directory.
+
+Similarly, the output directory is set to the .bin/ directory in your workspace. If you'd like to change that, change the `OUT_DIR` (be sure to apply that same change in your custom runner file).
+
+To build with your new builder, go to your Java file then click Run > Build System > My Builder. The .class files are now in your chosen output directory.
+
+Note:
+"My Builder" is the default name for a new builder. You may change the filename of your builder, just be sure to select this new builder. The same will be true for your runner.
+
+##Creating a Java runner
+
+In the menu, go to Run > Run With > New Runner
+
+You may copy and paste the following code for your Java runner:
+
+```bash
+{
+ "cmd": [
+ "sh",
+ "-c",
+ "echo $file | sed -r 's/.*\\/src\\///g' | sed -r 's/\\.java//g' | sed -r 's/\\//\\./g' | xargs java"
+ ],
+ "info": "\\033[01;34mRunning\\033[00m \\033[01;31m$file_name\\033[00m\n",
+ "env": {"OUT_DIR": "$project_path\\.bin", "CLASSPATH" : "$OUT_DIR:$CLASSPATH"},
+ "selector": "source.java",
+ "working_dir": "$project_path"
+}
+```
+To run your .class files with this new runner, go to your Java file then click Run > Run With > My Runner.
diff --git a/src/features/syntax_highlighting_themes.md b/src/features/syntax_highlighting_themes.md
index 717cc67..fad9571 100644
--- a/src/features/syntax_highlighting_themes.md
+++ b/src/features/syntax_highlighting_themes.md
@@ -44,6 +44,7 @@ We support highlighting for at least the following languages, and many more:
* ColdFusion
* C#
* CSS
+* Dart
* Go
* Groovy
* haXe
@@ -78,4 +79,4 @@ We support highlighting for at least the following languages, and many more:
* YAML
-We are always adding new themes and new languages to support, so check the menu often! Since we use Ace to provide syntax highlighting, [feel free to log an issue there](https://github.com/ajaxorg/ace/issues?labels=mode-request&page=1&state=open) for new requests.
\ No newline at end of file
+We are always adding new themes and new languages to support, so check the menu often! Since we use Ace to provide syntax highlighting, [feel free to log an issue there](https://github.com/ajaxorg/ace/issues?labels=mode-request&page=1&state=open) for new requests.
diff --git a/src/frameworks/frameworks_jekyll.md b/src/frameworks/frameworks_jekyll.md
index 6fc2536..5c1c480 100644
--- a/src/frameworks/frameworks_jekyll.md
+++ b/src/frameworks/frameworks_jekyll.md
@@ -5,6 +5,6 @@ Jekyll is a great static site generator, also used by github pages. You simply n
$ gem install jekyll
$ jekyll new my-awesome-site
$ cd my-awesome-site
- $ jekyll serve --port $PORT
+ $ jekyll serve --host $IP --port $PORT --baseurl ''
-
\ No newline at end of file
+
diff --git a/src/frameworks/frameworks_wordpress.md b/src/frameworks/frameworks_wordpress.md
new file mode 100644
index 0000000..3b862bc
--- /dev/null
+++ b/src/frameworks/frameworks_wordpress.md
@@ -0,0 +1,18 @@
+# Getting Started with WordPress
+
+WordPress was made to be simple and WordPress on Cloud9 is no different. Here are some key docs to getting started with WordPress.
+### Run & preview your WordPress site
+
+- [Running WordPress sites](https://docs.c9.io/running_WordPress_on_cloud9.html)
+- [Preview your site](https://docs.c9.io/run_an_application.html#pre-view-your-application)
+
+### Build & access your database
+
+- [PHP documentation](https://docs.c9.io/writing_a_php_app.html)
+- [Using MySQL](https://docs.c9.io/setting_up_mysql.html)
+- [phpMyAdmin](https://docs.c9.io/setting_up_phpmyadmin.html)
+
+### Deployment
+
+- [Deploying your site](https://docs.c9.io/deploying_via_cli.html)
+- [Mounting FTP](https://c9.io/site/blog/2014/12/ftp-sftp-mounting-beta)
\ No newline at end of file
diff --git a/src/getting_started/create_a_workspace.md b/src/getting_started/create_a_workspace.md
index 991511c..0cc1130 100644
--- a/src/getting_started/create_a_workspace.md
+++ b/src/getting_started/create_a_workspace.md
@@ -18,7 +18,7 @@ After clicking on **Create a new workspace**, you're taken to the screen below:
![Options for creating a new workspace](./resources/images/createNewWorkspaceOptions.png)<651, 151>
First, let's enter a workspace name.
-Depending on whether you have a Free of Premium account, you can choose to make it either Public (open to anyone with the URL), or Private (only accessible to you and people you share it with).
+Depending on whether you have a Free or Premium account, you can choose to make it either Public (open to anyone with the URL), or Private (only accessible to you and people you share it with).
After this, choose the type of workspace you want to create:
@@ -39,4 +39,4 @@ Now press **Create**. That's it! You can now see your new workspace in the dashb
Now, just click **Start Editing** to get started!
-Next up, read how to [run an application](run_an_application.html) and [set up a database](setup_a_database.html).
\ No newline at end of file
+Next up, read how to [run an application](run_an_application.html) and [set up a database](setup_a_database.html).
diff --git a/src/persistence/setting_up_couchdb.md b/src/persistence/setting_up_couchdb.md
new file mode 100644
index 0000000..5dedd74
--- /dev/null
+++ b/src/persistence/setting_up_couchdb.md
@@ -0,0 +1,18 @@
+# CouchDB
+
+[Apache CouchDB™](http://couchdb.apache.org/) is a database that uses JSON for documents,
+JavaScript for MapReduce indexes, and regular HTTP for its API.
+
+## Running CouchDB on a Cloud9 workspace
+
+CouchDB is preinstalled in your workspace. To run CouchDB, run the following below.
+
+ $ sudo mkdir -p /var/run/couchdb
+ $ sudo chown couchdb:couchdb /var/run/couchdb
+ $ sudo su couchdb -c /usr/bin/couchdb
+
+## Testing the connection
+
+To check if the database is running execute this in a new terminal:
+
+ $ curl http://127.0.0.1:5984
\ No newline at end of file
diff --git a/src/persistence/setting_up_mongodb.md b/src/persistence/setting_up_mongodb.md
index 958827e..3c641e7 100644
--- a/src/persistence/setting_up_mongodb.md
+++ b/src/persistence/setting_up_mongodb.md
@@ -31,12 +31,34 @@ You can start mongodb by running the `mongod` script on your project root:
### MongoDB parameters used:
-| Parameter | Description |
-| ------------------------------ | ----------------------------------------------------------------------------------------------- |
-| `--dbpath=data` | Because it defaults to /var/db which isn't accessible) |
-| `--nojournal` | Because mongodb usually pre-allocates 2 GB journal file (which exceeds Cloud9 disk space quota) |
-| `--bind_ip=$IP` | Because you can't bind to 0.0.0.0) |
-| `--rest` | Runs on default port 28017 |
+
+
+
+
+
Parameter
+
Description
+
+
+
+
+
--dbpath=data
+
Because it defaults to /var/db which isn't accessible)
+
+
+
--nojournal
+
Because mongodb usually pre-allocates 2 GB journal file (which exceeds Cloud9 disk space quota)
+
+
+
--bind_ip=$IP
+
Because you can't bind to 0.0.0.0)
+
+
+
--rest
+
Runs on default port 28017
+
+
+
+
## Drivers
diff --git a/src/persistence/setting_up_mysql.md b/src/persistence/setting_up_mysql.md
index 856ba91..697bcbc 100644
--- a/src/persistence/setting_up_mysql.md
+++ b/src/persistence/setting_up_mysql.md
@@ -26,7 +26,7 @@ $ mysql-ctl stop
$ mysql-ctl cli
```
-You can then connect to the database with following parameters:
+After having started (and with that created) the database, you can connect to it using the following parameters:
@@ -40,7 +40,7 @@ You can then connect to the database with following parameters:
`Hostname`
`$IP`
-
The same local IP as the application you run on Cloud9
+
The environment variable 'IP' (type in a terminal: echo $IP)
`Port`
@@ -50,12 +50,12 @@ You can then connect to the database with following parameters:
`User`
`$C9_USER`
-
Your Cloud9 user name
+
Your Cloud9 user name (again an environment variable)
`Password`
-
-
-
No password since you can only access the DB from within the workspace
+
``
+
No password (empty string); access is restricted to the the workspace
`Database`
@@ -80,6 +80,86 @@ You are now in the MySQL environment and can start the import:
To verify that everything got imported run:
mysql> show tables;
+
+Some useful CLI commands (please note the semicolon at the end of most of them):
+
+
+
+
+
Command
+
Description
+
+
+
+
+
`help`
+
`list all mysql commands`
+
+
+
`show databases;`
+
`list the available databases`
+
+
+
`use c9`
+
`select/use database c9`
+
+
+
`show tables;`
+
`list the tables of the current database`
+
+
+
`exit`
+
`close the mysql command line tool`
+
+
+
`select * from mysql.user;`
+
`show all records/columns from system table user`
+
+
+
+
+
+## Connecting from PHP
+
+So now you know how to create a database, start the db server, access it via a
+command line tool.. It is time for the real deal: accessing it from your code.
+
+In this example we will connect from PHP:
+
+1. Create a new file, call it `connect.php`
+
+2. Copy/paste the following code in there and save the file:
+```bash
+connect_error) {
+ die("Connection failed: " . $db->connect_error);
+ }
+ echo "Connected successfully (".$db->host_info.")";
+?>
+```
+
+3. Run the code by a right-click on the file tab 'connect.php', select 'run this file'
+
+4. The output pane shows 'Starting Apache httpd...'
+
+5. Click the link that is displayed after that
+
+6. A preview pane will open, showing 'Connected successfully (0.0.0.0 via TCP/IP)'.
+
Note:
MySQL socket file can be found in ~/lib/mysql/socket/mysql.sock
diff --git a/src/persistence/setting_up_phpmyadmin.md b/src/persistence/setting_up_phpmyadmin.md
new file mode 100644
index 0000000..7eba1e8
--- /dev/null
+++ b/src/persistence/setting_up_phpmyadmin.md
@@ -0,0 +1,23 @@
+# PHPMyAdmin
+
+PHPMyAdmin provides an easy to use web interface to manage your MySQL database/s
+
+## PHPMyAdmin's most common features
+* Import data from CSV and SQL
+* Export data to various formats: CSV, SQL, XML, PDF, Word, Excel, LaTeX and others
+* Creating PDF graphics of the database layout
+* Creating complex queries using Query-by-Example (QBE)
+* Searching globally in a database or a subset of it
+* Transforming stored data into any format using a set of predefined functions, like displaying BLOB-data as image or download-link
+* Live charts to monitor MySQL server activity like connections, processes, CPU/Memory usage, etc.
+* [Many more](http://en.wikipedia.org/wiki/PHPMyAdmin)
+
+## Using PHPMyAdmin with Cloud9
+This article explains our first iteration of PHPMyAdmin support in Cloud9. It makes it super easy to install a PHPMyAdmin instance right in your workspace. Each workspace runs it's own Database and copy of PHPMyAdmin.
+
+```bash
+# Install PHPMyAdmin
+$ phpmyadmin-ctl install
+```
+
+After the installation is complete you'll be given a link to access PHPMyAdmin. If you'd like further help using the software please consult the [official PHPMyAdmin docs](http://www.phpmyadmin.net/home_page/docs.php).
\ No newline at end of file
diff --git a/src/persistence/setting_up_postgresql.md b/src/persistence/setting_up_postgresql.md
index eec2583..1ffe936 100644
--- a/src/persistence/setting_up_postgresql.md
+++ b/src/persistence/setting_up_postgresql.md
@@ -10,27 +10,27 @@ PostgreSQL comes preinstalled on every Cloud9 workspace, yay.
### Set the "postgres" user password
- $ sudo sudo -u postgres psql
+ $ sudo sudo -u postgres psql
psql (9.3.4, server 9.3.5)
Type "help" for help.
-
+
postgres=# \password
- Enter new password:
- Enter it again:
+ Enter new password:
+ Enter it again:
postgres=# \q
## Connect to the service
- $ sudo sudo -u postgres psql
+ $ sudo sudo -u postgres psql
## Create a PostgreSQL database
Make sure you have logged into the PostgreSQL terminal and then you can just run:
- $ sudo sudo -u postgres psql
+ $ sudo sudo -u postgres psql
postgres=# create database "groceries";
-
+
## List all databases
- $ sudo sudo -u postgres psql
- postgres=# \list
\ No newline at end of file
+ $ sudo sudo -u postgres psql
+ postgres=# \list
diff --git a/src/persistence/setting_up_redis.md b/src/persistence/setting_up_redis.md
index 6b3b92a..889c644 100644
--- a/src/persistence/setting_up_redis.md
+++ b/src/persistence/setting_up_redis.md
@@ -13,9 +13,39 @@ sudo service redis-server start
Connect with the client:
```no-highlight
-./redis-cli
+redis-cli
```
+You can then connect to the database with following parameters:
+
+
+
+
+
Option
+
Value
+
Comment
+
+
+
+
+
`Hostname`
+
`$IP`
+
The same local IP as the application you run on Cloud9
+
+
+
`Port`
+
`6379`
+
The default Redis port number
+
+
+
`Password`
+
``
+
No password since you can only access the DB from within the workspace
+
+
+
+
+
## Drivers
See http://redis.io/clients for drivers.
\ No newline at end of file
diff --git a/src/running_and_debugging/common_errors.md b/src/running_and_debugging/common_errors.md
index 2bd98eb..a8a861d 100755
--- a/src/running_and_debugging/common_errors.md
+++ b/src/running_and_debugging/common_errors.md
@@ -14,7 +14,7 @@ If any relevant process is running you will get a list looking like this:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
apache2 699 ubuntu 4u IPv6 83213152 0t0 TCP *:http-alt (LISTEN)
-You now can kill that proccess. Make sure you replace PID with the ID of the process.
+You now can kill that process. Make sure you replace PID with the ID of the process.
// Kill the process
kill -9 PID
diff --git a/src/running_and_debugging/running_python_cgi.md b/src/running_and_debugging/running_python_cgi.md
new file mode 100644
index 0000000..bbe8b3e
--- /dev/null
+++ b/src/running_and_debugging/running_python_cgi.md
@@ -0,0 +1,116 @@
+# Running a Python CGI server
+
+In order to run a Python CGI server, you can start by creating a new workspace. It doesn't have to be a Python/Django workspace, even a Custom workspace would do. You would need to tell the Apache2 server already installed on the workspace to allow CGI scripts and to make sure it knows where to look for them.
+
+Lets start by creating a very simple python CGI script:
+
+1. Create a folder within your workspace, name it `cgi-bin` (the name doesn't matter, although it is customary to use `cgi-bin`).
+2. Within the `cgi-bin` folder, create a new file. Lets name it `test.py` for now.
+3. Paste in the following:
+
+```python
+#!/usr/bin/env python
+
+print "Content-type: text/html"
+print ""
+
+print """
+
+
+Sample CGI Script
+
+
+
Sample CGI Script
+
+
+"""
+```
+
+Now, once we have a file we want to serve, lets start up the Apache web server. We can do that by creating a new runner. You can create a new runner by clicking on the + icon on the right of the tabs like shown below:
+
+[![New Run Configuration](./resources/images/newRunConfiguration-new.png)]{: #NewRunConfiguration}
+
+then select Apache httpd (PHP, HTML)
+
+[![Select Apache Run Configuration](./resources/images/apacheRunConfiguration.png)]{: #ApacheRunConfiguration}
+
+You can save this configuration by entering a name to the right of the `Command:` label like shown below.
+
+[![Save Run Configuration](./resources/images/saveRunConfiguration.png)]{: #SaveRunConfiguration}
+
+
+Click on the Run button and the apache server is ready to go. Click on the link that reads something like: `https://-.c9.io/` and you should see a browser come up with your folder listing. Clicking on the `cgi-bin` link and then the `test.py` link just shows up the text of the python file we wrote. Now that we have the server running, lets enable CGI on it.
+
+The first thing we want to do is to enable CGI mode. We can do that by typing the following within the Terminal:
+
+```bash
+sudo a2enmod cgi
+```
+
+Next, we need to tell Apache where our CGI files are present. We can do that by editing the `serve-cgi-bin.conf` file. Do the following:
+
+```bash
+sudo vi /etc/apache2/conf-available/serve-cgi-bin.conf
+```
+
+The file should read something like this:
+
+```
+
+
+ Define ENABLE_USR_LIB_CGI_BIN
+
+
+
+ Define ENABLE_USR_LIB_CGI_BIN
+
+
+
+ ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
+
+ AllowOverride None
+ Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
+ Require all granted
+
+
+
+```
+
+We just need to modify the following section from:
+
+```
+
+ ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
+
+ AllowOverride None
+ Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
+ Require all granted
+
+
+```
+
+to
+
+```
+
+ ScriptAlias /cgi-bin/ /home/ubuntu/workspace/cgi-bin/
+
+ AllowOverride None
+ Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
+ AddHandler cgi-script .cgi .py
+ Require all granted
+
+
+```
+
+Save this file and restart Apache.
+
+Once Apache restarts, navigate to `https://-.c9.io/cgi-bin/test.py` (replacing `` and `` with your workspace name and your username of course) and see what happens? In case you're seeing something like **Internal Server Error** we need to make the files under cgi-bin to be executable.
+
+You can do that by typing
+
+```bash
+chmod +x -R /home/ubuntu/workspace/cgi-bin
+```
+
+Restart Apache one last time and you should be able to see **Sample CGI Script**.
\ No newline at end of file
diff --git a/src/running_and_debugging/running_wordpress_on_cloud9.md b/src/running_and_debugging/running_wordpress_on_cloud9.md
index 2d5df26..49ea35f 100755
--- a/src/running_and_debugging/running_wordpress_on_cloud9.md
+++ b/src/running_and_debugging/running_wordpress_on_cloud9.md
@@ -3,7 +3,7 @@
WordPress is web software you can use to create websites or blogs.
You can develop and host WordPress websites entirely on Cloud9 IDE
-### Creating a wordpress workspace
+### Creating a WordPress workspace
Create a WordPress workspace from the WordPress template on your Cloud9 dashboard
diff --git a/src/workspaces/picking_a_plan.md b/src/workspaces/picking_a_plan.md
new file mode 100644
index 0000000..883b605
--- /dev/null
+++ b/src/workspaces/picking_a_plan.md
@@ -0,0 +1,60 @@
+# Picking a Plan
+
+The [Plans and Pricing Page](https://c9.io/web/site/pricing) has the basics for the available plans but here, we'll break down the details of workspaces.
+
+## Workspace Choices
+With Cloud9, you write code, run commands, and build applications in workspaces (virtual machines) hosted on Google Cloud. You're free to resize workspaces at any time so don't fret about their initial sizing. Following are the different types of workspaces and their properties:
+
+### Micro Workspace
+- 512MB RAM
+- 1GB Disk space
+- 1 CPU
+- Private
+
+### Small Workspace
+- 512MB RAM
+- 5GB Disk space
+- 1 CPU
+- Private
+
+### Medium Workspace
+- 1GB RAM
+- 10GB Disk space
+- 1 CPU
+- Private
+
+### Large Workspace
+- 2GB RAM
+- 20GB Disk space
+- 1 CPU
+- Private
+
+### SSH Workspace
+- Resources determined by user
+- Private
+
+### Community Workspaces
+- 512MB RAM
+- 1GB Disk space
+- 1 CPU
+- Publicly readable
+- Archived after a week of inactivity (restored unchanged when you open it again)
+
+Given the resources from your plan, you may make as many private workspaces as you'd like. For example, if you're signed up for the large plan with 80gb of storage, you could use that to have 4 different large workspaces, each with 20gb of storage. With those 4 workspaces, you would have no resources left to make further private workspaces although you could still make more community workspaces.
+
+## Reaching the Limits
+
+When a workspace reaches its RAM limit, you will be notified and processes may be killed to stay within the limit.
+
+When the storage limit within a workspace is reached, the terminal will display a message to let you know. Any downloads will be stopped.
+
+## All plans
+
+The following features are provided with the free plan and all paid plans.
+
+- __Unlimited Community Workspaces__ - Each community workspace is readable by anyone, like a public GitHub repository.
+- __Team collaboration__ - You can invite coworkers, classmates, and anyone with an email address or Cloud9 account to work with you, real-time, giving read/write privileges to whomever you choose. Collaboration takes place live so you can see one another manipulating code real-time.
+- __VMs hosted on Google Cloud__ - Each VM/workspace is allotted resources according to your chosing. Those resources are important because each workspace is running on a VM hosted on Google Cloud.
+- __Sudo Shell Access/Terminal__ - Sudo access allows you to install your own programs or languages, giving them nearly the same amount of access they might have on a local machine.
+- __SSD Performance__ - VM's are hosted on SSD's to speed up processes and development.
+- __Running on Docker__ - Workspaces are powered by Docker Ubuntu containers that give you full freedom over your environment, including sudo rights.
\ No newline at end of file
diff --git a/src/workspaces/setting_up_bitbucket_workspace.md b/src/workspaces/setting_up_bitbucket_workspace.md
index eeee02b..1b48f68 100755
--- a/src/workspaces/setting_up_bitbucket_workspace.md
+++ b/src/workspaces/setting_up_bitbucket_workspace.md
@@ -1,6 +1,6 @@
# Setting Up a Bitbucket Workspace
-Bitbucket is a code-hosting services that offers both git and mercurial support. Projects can be listed as private or public, absolutely free. For more information on Bitbucket, visit .
+Bitbucket is a code-hosting services that offers both git and mercurial support. Projects can be listed as private or public, absolutely free. For more information on Bitbucket, visit .
We have integrated Bitbucket into the IDE to enable you to easily work on your public and private repositories. The following article explains how you can activate your Bitbucket account in Cloud9 IDE.
@@ -40,7 +40,7 @@ There are several ways to manage Bitbucket projects in Cloud9 IDE:
{:postCreate}
-There are a couple of things you should do first, before you can use all of git's power. First, you'll want to add a remote to the project. From the Cloud9 IDE command line, you can execute the following commands:
+There are a couple of things you should do first, before you can use all of git's power. First, you'll want to add a remote to the project. From the Cloud9 IDE command line, you can execute the following commands:
```bash
git remote add [remote name] [remote url]
@@ -60,7 +60,7 @@ Finally, create a commit that you can push to your remote:
git commit -m 'added new files'
```
-Don't forget to push this commit out to Bitbucket:
+Don't forget to push this commit out to Bitbucket:
```bash
git push [remote name] master
@@ -88,4 +88,7 @@ When you provide Cloud9 IDE with your Bitbucket credentials, it provides a list
![Bitbucket Pending Projects](./resources/images/bitbucketPendingWorkspaces.png)<250, 426>
-From this list, clicking on a project and selecting **CLONE TO EDIT** brings the repo into the IDE, just as if you cloned it from a URL.
\ No newline at end of file
+From this list, clicking on a project and selecting **CLONE TO EDIT** brings the repo into the IDE, just as if you cloned it from a URL.
+
+Note:
+In addition to the previously mentioned methods, you may also create a new workspace and perform a Git clone from the terminal in that new workspace.
\ No newline at end of file
diff --git a/templates/default/toc.jade b/templates/default/toc.jade
index 329334a..23fe325 100644
--- a/templates/default/toc.jade
+++ b/templates/default/toc.jade
@@ -60,6 +60,9 @@
// a(href='zen_mode.html') Zen Mode
li.nav-submenu-item
a(href='custom_runners.html') Custom Runners
+ ul
+ li.nav-submenu-item
+ a(href="java_runner.html") Making a Java Runner
li.nav-section
.nav-section-header
a(href='javascript:void(0)') IDE Components
@@ -106,6 +109,8 @@
a(href='ftp_workspaces.html') Creating an FTP Workspace
li.nav-submenu-item
a(href='run_your_own_workspace.html') Running Your Own SSH Workspace
+ li.nav-submenu-item
+ a(href='picking_a_plan.html') Picking a Plan
li.nav-section
.nav-section-header
a(href='javascript:void(0)') Running and Debugging Code
@@ -130,6 +135,8 @@
ul
li.nav-submenu-item
a(href="installing_python_packages.html") Installing Python Packages
+ li.nav-submenu-item
+ a(href="running_python_cgi.html") Running a Python CGI Server
li.nav-submenu-item
a(href='writing_a_ruby_app.html') Writing a Ruby App
ul
@@ -154,8 +161,13 @@
ul
li.nav-submenu-item
a(href='setting_up_mysql.html') Using MySQL
+ ul
+ li.nav-submenu-item
+ a(href='setting_up_phpmyadmin.html') Using PHPMyAdmin
li.nav-submenu-item
a(href='setting_up_mongodb.html') Using MongoDB
+ li.nav-submenu-item
+ a(href='setting_up_couchdb.html') Using CouchDB
li.nav-submenu-item
a(href='setting_up_postgresql.html') Using PostgreSQL
li.nav-submenu-item
@@ -170,10 +182,6 @@
ul
// li.nav-submenu-item
// a(href='deploying_code.html') Deploying Your Code
- // li.nav-submenu-item
- // a(href='deploying_to_heroku.html') Deploying to Heroku
- // li.nav-submenu-item
- // a(href='deploying_to_windows_azure_sites.html') Deploying to Windows Azure Sites
li.nav-submenu-item
a(href='deploying_via_cli.html') Deploying via the Command Line
li.nav-section
@@ -204,6 +212,8 @@
a(href='frameworks_meteor.html') Meteor
li.nav-submenu-item
a(href='frameworks_symfony2.html') Symfony
+ li.nav-submenu-item
+ a(href='frameworks_wordpress.html') Wordpress
li.nav-section
.nav-section-header
a(href='javascript:void(0)') FAQ