From ffcb2ed4ac334a0c58986c375ebaf4e3e47cf3e5 Mon Sep 17 00:00:00 2001 From: Tim Robinson Date: Thu, 20 Nov 2014 15:10:03 +0000 Subject: [PATCH 01/33] Add doc for setting up PHPMyAdmin --- src/persistence/setting_up_phpmyadmin.md | 24 ++++++++++++++++++++++++ templates/default/toc.jade | 3 +++ 2 files changed, 27 insertions(+) create mode 100644 src/persistence/setting_up_phpmyadmin.md diff --git a/src/persistence/setting_up_phpmyadmin.md b/src/persistence/setting_up_phpmyadmin.md new file mode 100644 index 0000000..7363f8b --- /dev/null +++ b/src/persistence/setting_up_phpmyadmin.md @@ -0,0 +1,24 @@ +# 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 (via the TCPDFfd\mya library), ISO/IEC 26300 - OpenDocument Text and Spreadsheet, Word, Excel, LaTeX and others +* Administering multiple servers +* 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. \ No newline at end of file diff --git a/templates/default/toc.jade b/templates/default/toc.jade index 329334a..17441af 100644 --- a/templates/default/toc.jade +++ b/templates/default/toc.jade @@ -154,6 +154,9 @@ 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 From fb3c17899560d40fa434ec0f61b60b2810c9f676 Mon Sep 17 00:00:00 2001 From: Tim Robinson Date: Thu, 20 Nov 2014 15:28:03 +0000 Subject: [PATCH 02/33] Minor tweaks to article Conflicts: out/cloud9-user-documentation.json out/index.html out/setting_up_phpmyadmin.html recentFiles.json --- out/cloud9-user-documentation.json | 418 ++++++++++++----------- out/index.html | 14 +- out/setting_up_phpmyadmin.html | 228 +++++++++++++ recentFiles.json | 2 +- src/persistence/setting_up_phpmyadmin.md | 5 +- 5 files changed, 452 insertions(+), 215 deletions(-) create mode 100644 out/setting_up_phpmyadmin.html diff --git a/out/cloud9-user-documentation.json b/out/cloud9-user-documentation.json index 76207ae..9ca06f7 100644 --- a/out/cloud9-user-documentation.json +++ b/out/cloud9-user-documentation.json @@ -2,462 +2,468 @@ "files": [ { "filename": "deploying_code", - "mtime": 1412172002000, + "mtime": 1416491265000, "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

\"The

\n

We offer tight integration with the following environments:

\n\n

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:

\n\n

Warning:

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.
\n\n
" }, { "filename": "deploying_to_heroku", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Deploying to Heroku", "contents": "\n

Deploying to Heroku

\n

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

\"Showing

\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

\"Dialog

\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:

\n
{\n    \"name\": \"cloud9-heroku-example\",\n    \"version\": \"0.0.1\"\n}
\n

After you have a package.json file, you might see this dialog:

\n

\"Dialog

\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

\"Console

\n

And just like that, you've deployed your project to Heroku.

\n\n
" }, { "filename": "deploying_to_windows_azure_sites", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Deploying to Windows Azure Sites", "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:
\"Windows

\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:
\"Windows

\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
  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 about your app.

    \n
  2. \n
  3. 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
  4. \n
  5. 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
  6. \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\"Windows

\n

For more information on configuring your app on the Windows Azure website, see Deploying a Windows Azure App from Cloud9.

\n\n
" }, { "filename": "deploying_via_cli", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Deploying via the Command Line", "contents": "

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.

\n

Windows Azure Web Sites

\n

Free and Premium Plans

\n

In the Console or a Terminal, type the \nfollowing:

\n
npm install azure
\n

Now, you can use the azure command from the Console/Terminal. For more \ninformation, read the official azure documentation.

\n

Premium Plans

\n

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):

\n
echo \"machine code.google.com login EMAIL password PASSWORD\" >> ~/.netrc\ngit remote add appengine REPO
\n

Note:

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
\n

NodeJitsu

\n

Free and Premium Plans

\n

In the the Console or a Terminal, type:

\n
npm install jitsu@0.7.x -g\nmkdir node_modules\nmv ../lib/node_modules/jitsu node_modules
\n

Now, you can run jitsu from the command line. For more information, see \nthe official jitsu documentation.

\n

Premium Plans

\n
npm install jitsu@0.7.x -g
\n

You can now run jitsu from both the Console and the Terminal.

\n

Modulus

\n

In the the Console or a Terminal, type:

\n
npm install modulus -g
\n

Now, you can run modulus from the command line. For more information, see \nthe official modulus documentation.

\n\n
" }, { "filename": "faq_general", - "mtime": 1416998245000, + "mtime": 1416491265000, "pageTitle": "FAQ: General", - "contents": "

FAQ: General

\n

Can I use FTP workspaces on Cloud9?

\n

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.

\n

How do I deploy to Heroku/Openshift/Azure/...?

\n

See Deploying via CLI.

\n

Can I connect to SMTP servers (port 25)?

\n

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 -d 1 -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
\n\n
" - }, - { - "filename": "faq_ssh", - "mtime": 1416998221000, - "pageTitle": "FAQ: SSH workspaces", - "contents": "

FAQ: SSH workspaces

\n

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"

\n

Try executing the following command:

\n
yum install ncurses-devel 
\n

or

\n
yum install glibc-static 
\n\n
" + "contents": "

FAQ: General

\n

Can I use FTP workspaces on Cloud9?

\n

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.

\n

How do I deploy to Heroku/Openshift/Azure/...?

\n

See Deploying via CLI.

\n

Can I connect to SMTP servers (port 25)?

\n

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 -d 1 -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

I can't preview my running app.

\n

Try using port 8080 instead, which often solves this case.

\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\n
" }, { "filename": "faq_php", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "FAQ: PHP", "contents": "

FAQ: PHP

\n

where are the Apache logs?

\n

By default the logs are in ~/lib/apache2/log

\n

Is mail() supported?

\n

No, this is currently not supported; see FAQ: General about SMTP access.

\n\n
" }, { "filename": "faq_python", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "FAQ: Python", "contents": "

FAQ: Python

\n

Why does easy_install report a permission_denied error?

\n

Please use sudo easy_install instead.

\n\n
" }, { - "filename": "colorpicker", - "mtime": 1412172002000, - "pageTitle": "Color Picker", - "contents": "\n

Color Picker

\n

Note:

this feature is deprecated\n\n
\n
\n\n
\n\n

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: \"Color

\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:
\"Color

\n

To set the value, just click anywhere outside of the color picker.

\n\n
" - }, - { - "filename": "language_analysis", - "mtime": 1412172002000, - "pageTitle": "Language Analysis", - "contents": "

Language Analysis

\n

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 (\"Little): these are non-critical, non-dangerous updates about your code
  • \n
  • Warnings (\"Warning): these are potentially incorrect pieces of code
  • \n
  • Errors (\"Error): 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:
\"fs

\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.

\n\n
" + "filename": "faq_ssh", + "mtime": 1416491265000, + "pageTitle": "FAQ: SSH workspaces", + "contents": "

FAQ: SSH workspaces

\n

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"

\n

Try executing the following command:

\n
yum install ncurses-devel 
\n

or

\n
yum install glibc-static 
\n\n
" }, { "filename": "autocompletion", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Code Autocompletion", "contents": "\n

Code Autocompletion

\n

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

\"Autocompletion

\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.

\n\n
" }, + { + "filename": "collaboration", + "mtime": 1416491265000, + "pageTitle": "Collaboration", + "contents": "

Collaboration

\n

Note:

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

\"The

\n

If you are the owner of a project, you can click on anyone's username to grant (or revoke) write access:

\n

\"Granting

\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
" + }, + { + "filename": "colorpicker", + "mtime": 1416491265000, + "pageTitle": "Color Picker", + "contents": "\n

Color Picker

\n

Note:

this feature is deprecated\n\n
\n
\n\n
\n\n

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: \"Color

\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:
\"Color

\n

To set the value, just click anywhere outside of the color picker.

\n\n
" + }, + { + "filename": "git_blame", + "mtime": 1416491265000, + "pageTitle": "Git Blame", + "contents": "\n

Git Blame

\n

Note:

this feature is deprecated\n\n
\n
\n\n
\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.

\n\n
" + }, { "filename": "custom_runners", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Custom Runners", "contents": "

Custom Runners

\n

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.

\n
{\n    \"cmd\": [\"go\", \"run\", \"$file\", \"$args\"],\n    \"selector\": \"source.go\",\n    \"info\": \"Your code is running :)\"\n}
\n

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.

    \n
  • \n
\n\n
" }, { "filename": "gotofile_and_definition", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Using Goto File and Goto Definition", "contents": "\n

Using Goto File and Goto Definition

\n

Note:

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

\"Goto

\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

\"Goto

\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.

\n\n
" }, { - "filename": "collaboration", - "mtime": 1412172002000, - "pageTitle": "Collaboration", - "contents": "

Collaboration

\n

Note:

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

\"The

\n

If you are the owner of a project, you can click on anyone's username to grant (or revoke) write access:

\n

\"Granting

\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
" - }, - { - "filename": "searching_in_files", - "mtime": 1412172002000, - "pageTitle": "Searching and Replacing in Files", - "contents": "

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:
\"Search

\n\n
" + "filename": "language_analysis", + "mtime": 1416491265000, + "pageTitle": "Language Analysis", + "contents": "

Language Analysis

\n

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 (\"Little): these are non-critical, non-dangerous updates about your code
  • \n
  • Warnings (\"Warning): these are potentially incorrect pieces of code
  • \n
  • Errors (\"Error): 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:
\"fs

\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.

\n\n
" }, { "filename": "multiple_cursors", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Multiple Cursors", "contents": "\n

Multiple Cursors

\n

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

\"Showing

\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.

\n\n
" }, + { + "filename": "revisions", + "mtime": 1416491265000, + "pageTitle": "Revisions", + "contents": "\n

Revisions

\n

Note:

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: \"Revisions

\n\n
" + }, + { + "filename": "searching_in_files", + "mtime": 1416491265000, + "pageTitle": "Searching and Replacing in Files", + "contents": "

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:
\"Search

\n\n
" + }, { "filename": "supported_languages", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Supported Languages", "contents": "

Supported Languages

\n

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.

\n

See Syntax Highlighting & Themes for more \ninfo.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n

Running apps

\n

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.

\n\n
" }, { "filename": "syntax_highlighting_themes", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Syntax Higlighting and Themes", "contents": "\n

Syntax Higlighting and Themes

\n
\n\n

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.

\n\n
" }, { "filename": "uploading_downloading", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Uploading and Downloading Workspace Files", "contents": "\n

Uploading and Downloading Workspace Files

\n

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

\"Uploading

\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.

\n\n
" }, + { + "filename": "zen_mode", + "mtime": 1416491265000, + "pageTitle": "Activating Zen Mode", + "contents": "\n

Activating Zen Mode

\n

Note:

this feature is deprecated\n\n
\n
\n\n
\n\n

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.

\n\n
" + }, { "filename": "frameworks_drupal", - "mtime": 1416998221000, + "mtime": 1416491265000, "pageTitle": "Framework: Drupal", "contents": "\n

Framework: Drupal

\n

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

\"Drupal

\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

\"Drupal

\n

Now fill the form with the correct site information:

\n

\"Drupal

\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
\n

\"Drupal

\n\n
" }, { - "filename": "git_blame", - "mtime": 1412172002000, - "pageTitle": "Git Blame", - "contents": "\n

Git Blame

\n

Note:

this feature is deprecated\n\n
\n
\n\n
\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.

\n\n
" + "filename": "frameworks_angularjs", + "mtime": 1416491265000, + "pageTitle": "Framework AngularJS", + "contents": "\n

Framework AngularJS

\n

AngularJS lets you write client-side web \napplications as if you had a smarter browser.

\n

Follow these steps to create an AngularJS application using the official project\ntemplate:

\n
    \n
  1. Create a workspace and choose the PHP workspace type
  2. \n
  3. Open a Terminal, or using the pre-existing one at the bottom
  4. \n
  5. Run the following commands in the Terminal:
    rm -rf * .c9\ngit clone https://github.com/angular/angular-seed.git .\nnpm install\nmv package.json package.json.bak\njq '.scripts.start=\"http-server -a $IP -p $PORT\"' package.json.bak > package.json
    \n
  6. \n
  7. Click the Run Project button in the top menu of the IDE
  8. \n
  9. Check the README.md for further steps
  10. \n
\n

Note:

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.
\n\n
" }, { - "filename": "zen_mode", - "mtime": 1412172002000, - "pageTitle": "Activating Zen Mode", - "contents": "\n

Activating Zen Mode

\n

Note:

this feature is deprecated\n\n
\n
\n\n
\n\n

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.

\n\n
" + "filename": "frameworks_express", + "mtime": 1416496691000, + "pageTitle": "Framework: Express", + "contents": "

Framework: Express

\n

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:

\n
$ npm install -g express-generator\n$ express -f .\n$ npm install
\n

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
  1. Click Run -> Run Configurations -> Manage ...
  2. \n
  3. Click Add New Config
  4. \n
  5. In the run panel fill in Express as name, bin/www as the command and Node 0.10.x as the runner.
  6. \n
  7. 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.
  8. \n
\n

The finished run configuration should look something like this

\n

\"Express

\n\n
" + }, + { + "filename": "frameworks_ghost", + "mtime": 1416491265000, + "pageTitle": "Framework: Ghost", + "contents": "\n

Framework: Ghost

\n

Ghost is a simple, powerful publishing platform that \nallows you to share your story with the world.

\n

Create a Ghost blog as follows:

\n
    \n
  1. Create a new workspace (Node.js or Custom for a clean workspace)
  2. \n
  3. Open a Terminal, or use the pre-existing one at the bottom
  4. \n
  5. Run the following commands in the Terminal:

    \n
     $ curl -L https://ghost.org/zip/ghost-latest.zip -o ghost.zip\n $ unzip -uo ghost.zip -d .\n $ rm ghost.zip\n $ npm install --production
    \n
  6. \n
  7. Adapt the config.js file to the Cloud9 environment. Change the following keys:

    \n
     config: {\n     development: {\n         url: 'https://' + process.env.C9_HOSTNAME,\n     },\n     server: {\n         host: process.env.IP,\n         port: process.env.PORT\n     }\n }
    \n
  8. \n
  9. Run Ghost by typing npm start in the console or by opening index.js and\nhitting the run button.

    \n
  10. \n
  11. 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
  12. \n
\n

Change the URL to /ghost and create your admin user to login to the Ghost admin interface

\n

Note:

These instructions are based on the official Ghost Installation Guide\n
\n\n
" }, { "filename": "frameworks_ionic", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Framework: Ionic", "contents": "\n

Framework: Ionic

\n

Ionic is an open source front-end framework for developing hybrid mobile apps with HTML5.

\n

Create a Ionic app as follows:

\n
    \n
  1. Create a new workspace (Node.js or Custom for a clean workspace)
  2. \n
  3. Open a Terminal, or use the pre-existing one at the bottom
  4. \n
  5. Run the following commands in the Terminal:

    \n
     $ npm install -g cordova ionic\n $ ionic start myApp sidemenu\n $ cd myApp\n $ ionic serve $PORT
    \n
  6. \n
  7. 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
  8. \n
\n\n
" }, { - "filename": "frameworks_ghost", - "mtime": 1416995769000, - "pageTitle": "Framework: Ghost", - "contents": "\n

Framework: Ghost

\n

Ghost is a simple, powerful publishing platform that \nallows you to share your story with the world.

\n

Create a Ghost blog as follows:

\n
    \n
  1. Create a new workspace (Node.js or Custom for a clean workspace)
  2. \n
  3. Open a Terminal, or use the pre-existing one at the bottom
  4. \n
  5. Run the following commands in the Terminal:

    \n
     $ curl -L https://ghost.org/zip/ghost-latest.zip -o ghost.zip\n $ unzip -uo ghost.zip -d .\n $ rm ghost.zip\n $ npm install --production
    \n
  6. \n
  7. Adapt the config.js file to the Cloud9 environment. Change the following keys:

    \n
     config: {\n     development: {\n         url: 'https://' + process.env.C9_HOSTNAME,\n     },\n     server: {\n         host: process.env.IP,\n         port: process.env.PORT\n     }\n }
    \n
  8. \n
  9. Run Ghost by typing npm start in the console or by opening index.js and\nhitting the run button.

    \n
  10. \n
  11. 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
  12. \n
\n

Change the URL to /ghost and create your admin user to login to the Ghost admin interface

\n

Note:

These instructions are based on the official Ghost Installation Guide\n
\n\n
" + "filename": "frameworks_jekyll", + "mtime": 1416491265000, + "pageTitle": "Framework: Jekyll", + "contents": "\n

Framework: Jekyll

\n

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
" }, { "filename": "frameworks_joomla", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Joomla", "contents": "

Joomla

\n

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
\n

Download Joomla

\n
    \n
  1. Create a Cloud9 workspace of type "Custom" or "PHP"
  2. \n
  3. Download and Unzip Joomla from the Terminal. You can find the latest version on the Joomla website

    \n
     wget http://joomlacode.org/gf/download/frsrelease/19665/160049/Joomla_3.3.3-Stable-Full_Package.zip\n unzip Joomla*.zip\n rm Joomla*.zip
    \n
  4. \n
\n

Start the database

\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
  1. Pop out the Preview by clicking the Popout icon \"Preview (or copy & load the URL in a browser tab)
  2. \n
  3. Change the URL from https:// to http:// and load it
  4. \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

\"Joomla

\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

\"Joomla

\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!

\n\n
" }, - { - "filename": "revisions", - "mtime": 1412172002000, - "pageTitle": "Revisions", - "contents": "\n

Revisions

\n

Note:

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: \"Revisions

\n\n
" - }, { "filename": "frameworks_koa", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Framework: Koa", "contents": "\n

Framework: Koa

\n

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.

\n

(Credits go to Tom at http://kyorcode.blogspot.nl/2014/08/running-koajs-in-cloud9.html)

\n\n
" }, - { - "filename": "frameworks_express", - "mtime": 1416998221000, - "pageTitle": "Framework: Express", - "contents": "

Framework: Express

\n

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:

\n
$ npm install -g express-generator\n$ express -f .\n$ npm install
\n

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
  1. Click Run -> Run Configurations -> Manage ...
  2. \n
  3. Click Add New Config
  4. \n
  5. In the run panel fill in Express as name, bin/www as the command and Node 0.10.x as the runner.
  6. \n
  7. 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.
  8. \n
\n

The finished run configuration should look something like this

\n

\"Express

\n\n
" - }, { "filename": "frameworks_laravel", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Framework: Laravel", "contents": "\n

Framework: Laravel

\n

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:

\n
rm README.md php.ini hello-world.php\ncomposer create-project laravel/laravel ./laravel --prefer-dist\nshopt -s dotglob\nmv laravel/* ./\nrm -rf laravel
\n

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.

\n

\"Run

\n\n
" }, { "filename": "frameworks_meteor", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Framework: Meteor", "contents": "\n

Framework: Meteor

\n

Meteor is an open-source platform for building web apps.

\n

Create a Meteor app as follows:

\n
    \n
  1. Create a new workspace (Node.js or Custom for a clean workspace)
  2. \n
  3. Open a Terminal, or using the pre-existing one at the bottom
  4. \n
  5. Run the following commands in the Terminal:

    \n
     curl https://install.meteor.com/ | sh\n meteor create ./my_cool_app\n cd my_cool_app/\n meteor --port $IP:$PORT
    \n
  6. \n
  7. 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
  8. \n
\n

Note:

Alternatively, for the last step, click on the link that's displayed in the terminal, and change it in the resulting Preview to http://127.0.0.1:8080.
\n\n
" }, { "filename": "frameworks_symfony2", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Framework: Symfony2 ", "contents": "

Framework: Symfony2

\n

Symfony is one of the leading PHP Webframeworks. It is Open-Source and built on top of the Symfony Components.

\n

Getting started

\n
    \n
  1. Create a Cloud9 workspace of the type "Custom" or "PHP"
  2. \n
  3. Install the Intl extension for PHP that is required in most of the Symfony2 projects

    \n
     sudo apt-get install php5-intl
    \n
  4. \n
  5. Set a valid PHP timezone

    \n
     echo 'date.timezone = UTC' | sudo tee --append /etc/php5/apache2/php.ini
    \n
  6. \n
  7. Starting MySQL-Server

    \n
     sudo mysql-ctl install\n sudo mysql-ctl start
    \n
  8. \n
\n

Create a Symfony-Project

\n

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.

\n
    rm README.md php.ini hello-world.php\n    composer create-project symfony/framework-standard-edition symfony/ \"2.5.*\"\n    mv symfony/{*,.*} ./ \n    rm -rf symfony
\n

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.0 403 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.

\n\n
" }, + { + "filename": "create_a_workspace", + "mtime": 1416491265000, + "pageTitle": "Create a Workspace", + "contents": "\n

Create a Workspace

\n

Cloud9 supports three types of workspaces:

\n
    \n
  1. Hosted
  2. \n
  3. FTP
  4. \n
  5. SSH
  6. \n
\n

"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

\"New

\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

\"Options

\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

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

\"Options

\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:

\n

\"New

\n

Now, just click Start Editing to get started!

\n

Next up, read how to run an application and set up a database.

\n\n
" + }, { "filename": "run_an_application", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Run an application", "contents": "

Run an application

\n

On Hosted and SSH workspaces, Cloud9 provides two ways to run your application:

\n
    \n
  1. Using the Run panel with built-in Runners for many languages
  2. \n
  3. From a Terminal
  4. \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

\"Run

\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

\"Run

\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
  • \n
  • Environment: Set environment variables
  • \n
  • \n
\n

Tip:

If you can't find the Runner you need from the default set, you can create your own custom Runner.\n\n
\n

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
  1. 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.
  2. \n
  3. 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.
  4. \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, + "mtime": 1416491265000, "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 note of 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:

\n
$ mysql-ctl cli\nWelcome to the MySQL monitor.  Commands end with ; or \\g.\nYour MySQL connection id is 24\nServer version: 5.5.37-0ubuntu0.14.04.1 (Ubuntu)\n\nCopyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.\n\nOracle is a registered trademark of Oracle Corporation and/or its\naffiliates. Other names may be trademarks of their respective\nowners.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nmysql>  show databases;\n+--------------------+\n| Database           |\n+--------------------+\n| information_schema |\n| c9                 |\n| mysql              |\n| performance_schema |\n+--------------------+\n4 rows in set (0.15 sec)
\n

MongoDB

\n

From the Terminal, run the following command:

\n
$ mongod --bind_ip=$IP --nojournal
\n

The output will include:

\n
...\nwaiting for connections on port 27017
\n

Now you can open the mongo shell in a new Terminal, running following command:

\n
$ mongo
\n

To stop the MongoDB instance press Control+C in the Terminal where mongod is running.\nNow have a look at the currently used database:

\n
$ mongo\nmongo> db\ntest
\n\n
" }, - { - "filename": "dashboard", - "mtime": 1412172002000, - "pageTitle": "The Dashboard", - "contents": "\n

The Dashboard

\n

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

\"An

\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

\"A

\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
  • \n
\n

Clicking on the \"Project next to MY PROJECTS lets you:

\n
    \n
  • Create a new project
  • \n
  • Clone from URL
  • \n
\n

\"Creating

\n

For more information on creating new workspaces, see this section of the documentation.

\n

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: \"Refresh

\n\n
" - }, - { - "filename": "create_a_workspace", - "mtime": 1412172002000, - "pageTitle": "Create a Workspace", - "contents": "\n

Create a Workspace

\n

Cloud9 supports three types of workspaces:

\n
    \n
  1. Hosted
  2. \n
  3. FTP
  4. \n
  5. SSH
  6. \n
\n

"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

\"New

\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

\"Options

\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

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

\"Options

\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:

\n

\"New

\n

Now, just click Start Editing to get started!

\n

Next up, read how to run an application and set up a database.

\n\n
" - }, - { - "filename": "ide_overview", - "mtime": 1412172002000, - "pageTitle": "IDE Overview", - "contents": "

IDE Overview

\n

Note:

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

\"IDE

\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:
\"Hiding

\n

The Top Menu Bar

\n

\"A

\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.

\n

In the middle of the menu bar you'll find the debug button: \"The. This is used for running and debugging your code. For more information, see the section on "Running and Debugging Your Code"..

\n

\n

The preview button \"The 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: \"Autosave. 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 \"Tab 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.

\n

At the lower-right corner, you can find the status bar.

\n\n
" - }, { "filename": "share_a_workspace", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Share a workspace", "contents": "

Share a workspace

\n

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

\"Share

\n

Here's what you see when you pull up the Share dialog:

\n

\"Share

\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

\"Collaboration

\n

In order to share your entire development environment, do one of the following:

\n
    \n
  1. Make the URL publicly available to everyone: check the "Public" checkbox for the "Editor" in the "Links to Share" section.
  2. \n
  3. Choose to share only with specific people: invite them from the "Invite people" section.
  4. \n
  5. Grant/revoke access rights in the "Who has access" section.
  6. \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.
\n\n
" }, { "filename": "console", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "The Console", "contents": "

The Console

\n

Note:

this feature is deprecated\n\n
\n

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:

\n\n

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:

\n\n

Output

\n

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:
\"Screenshot

\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: \"Running

\n

If you hover over this message, you can opt to cancel the process by clicking on the button: \"Cancelling

\n\n
" }, { - "filename": "frameworks_angularjs", - "mtime": 1412172002000, - "pageTitle": "Framework AngularJS", - "contents": "\n

Framework AngularJS

\n

AngularJS lets you write client-side web \napplications as if you had a smarter browser.

\n

Follow these steps to create an AngularJS application using the official project\ntemplate:

\n
    \n
  1. Create a workspace and choose the PHP workspace type
  2. \n
  3. Open a Terminal, or using the pre-existing one at the bottom
  4. \n
  5. Run the following commands in the Terminal:
    rm -rf * .c9\ngit clone https://github.com/angular/angular-seed.git .\nnpm install\nmv package.json package.json.bak\njq '.scripts.start=\"http-server -a $IP -p $PORT\"' package.json.bak > package.json
    \n
  6. \n
  7. Click the Run Project button in the top menu of the IDE
  8. \n
  9. Check the README.md for further steps
  10. \n
\n

Note:

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.
\n\n
" + "filename": "dashboard", + "mtime": 1416491265000, + "pageTitle": "The Dashboard", + "contents": "\n

The Dashboard

\n

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

\"An

\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

\"A

\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
  • \n
\n

Clicking on the \"Project next to MY PROJECTS lets you:

\n
    \n
  • Create a new project
  • \n
  • Clone from URL
  • \n
\n

\"Creating

\n

For more information on creating new workspaces, see this section of the documentation.

\n

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: \"Refresh

\n\n
" + }, + { + "filename": "ide_overview", + "mtime": 1416491265000, + "pageTitle": "IDE Overview", + "contents": "

IDE Overview

\n

Note:

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

\"IDE

\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:
\"Hiding

\n

The Top Menu Bar

\n

\"A

\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.

\n

In the middle of the menu bar you'll find the debug button: \"The. This is used for running and debugging your code. For more information, see the section on "Running and Debugging Your Code"..

\n

\n

The preview button \"The 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: \"Autosave. 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 \"Tab 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.

\n

At the lower-right corner, you can find the status bar.

\n\n
" + }, + { + "filename": "ide_preferences", + "mtime": 1416491265000, + "pageTitle": "IDE Preferences", + "contents": "

IDE Preferences

\n

Note:

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 \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Preference NameDescription
Enable UI AnimationsEnables or disables fluid animations for various UI elements, such as the Project Bar
Animate ScrollingEnables or disables fluid animations when scrolling through code (such as for goto line)
Enable Auto-SaveIf enabled, automatically saves your files on every change
On Save, Strip WhitespaceWhen saving a file, you can remove all extraneous whitespace from your code lines
Reveal Active File in Project TreeEnabling this jumps the project tree to the active file whenever a tab changes to a different file
Warn Before ExitingPrevents accidental data loss by showing a dialog asking if you really want to leave Cloud9 IDE when closing your browser
Node.js RuntimeDefines 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.
KeybindingsAllows you to choose which operating system to use for keyboard shortcuts
\n

Language Support

\n

This section controls language analysis options:

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n
Preference NameDescription
Enable Hints and Warnings RulesPresents information about your code in the gutter
Highlight Variable InstancesHighlights variable instances in your code
Mark Undeclared VariablesProvides warnings if a variable is being used and has not been declared yet
Mark Unused Function ArgumentsProvides a strikethrough for arguments in a function that are not being used
Warning LevelSpecifies the minimum level of information severity you want provided in the gutter
\n

Code Editor

\n

This section controls language analysis options:

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Preference NameDescription
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 SelectionWhen highlighting lines, this option will highlight all ending whitespace, until the end of the editor window
Highlight Active LinePresents a darker shade in the code editor to indicate which line you're currently on
Highlight Gutter LinePresents a darker shade in the gutter which line you're currently on
Show Invisible CharactersShows invisibles characters in the editor, like tabs and line breaks
Show Indent GuidesShows the indent guides in the editor, letting you see your code's nestings
Show GutterShows the gutter in the editor, which indicates line numbers, warnings, and errors
Highlight Selected WordIf you highlight a word, this highlights all matching words in the editor
Auto-hide Horizontal ScrollWhen 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 ModeWhen enabled, allows you to use vim keybindings in the IDE
Code FoldingWhen enabled, allows you to show or hide "blocks" of code
Fade Fold WidgetsWhen enabled, fades the folding widgets in the gutter
Font SizeChanges the font size of the code in the editor
Show Print MarginShows (and defines) the number of characters possible in line, before it wraps
Soft TabsIndicates how many spaces a single tab represents
Mouse Scroll SpeedDefines the speed of the mouse scrolls
Newline ModeSpecifies the newline mode for the IDE
\n

Terminal

\n

This section controls the behavior for the terminal:

\n
\n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n
Preference NameDescription
ScrollbackSets the scrollback buffer for the terminal
Font FamilySets the font for the terminal
Font SizeSets the font size for the terminal
Blinking CursorSpecifies whether or not you want the cursor to blink
\n

Code Tools

\n

This section controls the various tools that are available in the IDE:

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n
Preference NameDescription
Enable Color PickerMakes the color picker available for use
Preserve Empty LinesWhen enabled, the editor keeps any new lines without text
Keep Array IndentionWhen enabled, tabs and newlines in arrays are preserved. For example, the follow array would remain as-is with this option:\n
\n        var o = [{\n            a: b\n        }, {\n            c: d\n        }];\n        
\n
JSLint Strict WhitespaceIf selected, all brackets are preceded by a space. For example, if(x){ becomes if (x) {, and function(arg){ becomes function (arg) {
BracesThese options control how braces are handled in the IDE:\n
    \n
  • Braces with control statement: braces are left "in-line" alongside the code statements. For example, code is formatted like this:\n
    \n    if (true) {\n        var x = 3;\n    } else {\n        var x = 5;\n    }\n    
    \n
  • \n
  • Braces on own line: braces are always placed on their own line. For example, code is formatted like this:\n
    \n    if (true)\n    {\n        var x = 3;\n    } else\n    {\n        var x = 5;\n    }\n    
    \n
  • \n
  • End braces on own line: only the ending braces have their own line. For example, code is formatted like this:\n
    \n    if (true) {\n        var x = 3;\n    }\n    else {\n        var x = 5;\n    }\n    
    \n
  • \n
\n
\n
" }, { "filename": "keybindings", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Commands and Keybindings", "contents": "\n

Commands and Keybindings

\n

Note:

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!

\n
\n \n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Command NameKeybinding
Abortclicommand˄-C
AddCursorAbove˄-⌥-Up
AddCursorAboveSkipCurrent˄-⌥-⇧-Up
AddCursorBelow˄-⌥-Down
AddCursorBelowSkipCurrent˄-⌥-⇧-Down
Backspace˄-⌫
Beautify⌘-⇧-B
Clearcut
Closeallbutme⌥-˄-W
Closealltabs⌥-⇧-W
Closetab⌥-W
Complete˄-Space
Copy⌘-C
Copylinesdown⌘-⌥-Down
Copylinesup⌘-⌥-Up
Cut⌘-X
DelDelete
DuplicateSelection⌘-⇧-D
Escapeconsole
EvalInteractive⌘-Return
Find⌘-F
Findnext⌘-G
Findprevious⌘-⇧-G
Fold⌘-⌥-L
Foldall⌘-⌥-0
GolinedownDown
GolineupUp
Gotoend⌘-End
Gotofile⌘-E
GotoleftLeft
Gotoline⌘-L
Gotolineend⌘-Right
Gotolinestart⌘-Left
GotopagedownPageDown
GotorightRight
Gotostart⌘-Home
Gototableft⌘-[
Gototabright⌘-]
Gotowordleft⌥-Left
Gotowordright⌥-Right
IndentTab
Jumptomatching˄-⇧-P
Largerfont˄-⇧-.
Movelinesdown⌥-Down
Movelinesup⌥-Up
Movetableft⌘-⌥-[
Movetabright⌘-⌥-]
Newfile⌥-⇧-N
Newfiletemplate⌥-˄-N
Newfolder⌥-˄-⇧-N
Nexttab⌥-Tab
Openfilepanel⇧-⌘-U
Opensettingspanel⌘-,
Opentreepanel⌘-U
Outdent⇧-Tab
Outline⌘-⇧-E
Paste⌘-V
Previoustab⌥-⇧-Tab
Quicksave⌘-S
Quickwatch⌥-Q
Redo⌘-⇧-Z
Removeline⌘-D
Removetolineend˄-K
Removetolinestart⌘-⌫
Removewordleft⌥-⌫
Removewordright⌥-Delete
RenameVar⌥-⌘-R
Replace⌥-⌘-F
Replaymacro⌘-˄-R
ResumeF8
Revealtab⇧-⌘-L
Reverttosaved˄-⇧-Q
Revisionpanel⌘-B
RunF5
Saveas⌘-⇧-S
Savetabsession⇧-˄-S
Searchinfiles⇧-⌘-F
SelectMoreAfter˄-⌥-Right
SelectMoreBefore˄-⌥-Left
SelectNextAfter˄-⌥-⇧-Right
SelectNextBefore˄-⌥-⇧-Left
Selectall⌘-A
Selectdown⇧-Down
Selectleft⇧-Left
Selectright⇧-Right
Selecttoend⌘-⇧-Down
Selecttolineend⌘-⇧-Right
Selecttolinestart⌘-⇧-Left
Selecttostart⌘-⇧-Up
Selectup⇧-Up
Selectwordleft⌥-⇧-Left
Selectwordright⌥-⇧-Right
Smallerfont˄-⇧-,
SplitIntoLines˄-⇧-L
StepintoF11
Stepout⇧-F11
StepoverF10
Stop⇧-F5
Switchconsole⇧-⎋
Tab0⌘-0
Tab1⌘-1
Tab2⌘-2
Tab3⌘-3
Tab4⌘-4
Tab5⌘-5
Tab6⌘-6
Tab7⌘-7
Tab8⌘-8
Tab9⌘-9
ToggleTabs˄-M
Togglecomment⌘-/
Toggleconsole˄-⎋
Togglerecording⌘-⇧-R
Tolowercase˄-⇧-U
Touppercase˄-U
Transposeletters˄-T
Undo⌘-Z
Unfold⌘-⌥-⇧-L
Unfoldall⌘-⌥-⇧-0
Zen⌥-Z
Zenslow⇧-⌥-Z
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Command NameKeybinding
AbortclicommandCtrl-C
AddCursorAboveCtrl-Alt-Up
AddCursorAboveSkipCurrentCtrl-Alt-Shift-Up
AddCursorBelowCtrl-Alt-Down
AddCursorBelowSkipCurrentCtrl-Alt-Shift-Down
BackspaceCommand-Backspace
BeautifyShift-Ctrl-B
ClearcutESC
CloseallbutmeCtrl-Alt-W
ClosealltabsCtrl-Shift-W
ClosetabCtrl-W
CompleteCtrl-Space
CopyCtrl-C
CopylinesdownAlt-Shift-Down
CopylinesupAlt-Shift-Up
CutCtrl-X
DelDelete
DuplicateSelectionCtrl-Shift-D
EscapeconsoleEsc
EvalInteractiveCtrl-Return
FindCtrl-F
FindnextCtrl-K
FindpreviousCtrl-Shift-K
FoldAlt-L
FoldallAlt-0
GolinedownDown
GolineupUp
GotoendCtrl-End
GotofileCtrl-E
GotoleftLeft
GotolineCtrl-G
GotolineendAlt-Right
GotolinestartAlt-Left
GotopagedownPageDown
GotorightRight
GotostartCtrl-Home
GototableftCtrl-[
GototabrightCtrl-]
GotowordleftCtrl-Left
GotowordrightCtrl-Right
IndentTab
JumptomatchingCtrl-P
LargerfontCtrl-Shift-.
MovelinesdownAlt-Down
MovelinesupAlt-Up
MovetableftCtrl-Alt[
MovetabrightCtrl-Alt-]
NewfileCtrl-N
NewfiletemplateCtrl-Alt-N
NewfolderCtrl-N
NexttabCtrl-Tab
OpenfilepanelShift-Ctrl-U
OpensettingspanelCtrl-,
OpentreepanelCtrl-U
OutdentShift-Tab
OutlineCtrl-Shift-E
PasteCtrl-V
PrevioustabCtrl-Shift-Tab
QuicksaveCtrl-S
QuickwatchAlt-Q
RedoCtrl-Shift-Z
RemovelineCtrl-D
RemovetolineendAlt-Delete
RemovetolinestartAlt-Backspace
RemovewordleftCtrl-Backspace
RemovewordrightCtrl-Delete
RenameVarCtrl-Alt-R
ReplaceAlt-Shift-F
ReplaymacroAlt-R
ResumeF8
RevealtabCtrl-Shift-L
ReverttosavedCtrl-Shift-Q
RevisionpanelCtrl-B
RunF5
SaveasCtrl-Shift-S
SavetabsessionShift-Ctrl-S
SearchinfilesCtrl-Shift-F
SelectMoreAfterCtrl-Alt-Right
SelectMoreBeforeCtrl-Alt-Left
SelectNextAfterCtrl-Alt-Shift-Right
SelectNextBeforeCtrl-Alt-Shift-Left
SelectallCtrl-A
SelectdownShift-Down
SelectleftShift-Left
SelectrightShift-Right
SelecttoendCtrl-Shift-End
SelecttolineendAlt-Shift-Right
SelecttolinestartAlt-Shift-Left
SelecttostartCtrl-Shift-Home
SelectupShift-Up
SelectwordleftCtrl-Shift-Left
SelectwordrightCtrl-Shift-Right
SmallerfontCtrl-Shift-,
SplitIntoLinesCtrl-Shift-L
StepintoF11
StepoutShift-F11
StepoverF10
StopShift-F5
SwitchconsoleShift-Esc
Tab0Ctrl-0
Tab1Ctrl-1
Tab2Ctrl-2
Tab3Ctrl-3
Tab4Ctrl-4
Tab5Ctrl-5
Tab6Ctrl-6
Tab7Ctrl-7
Tab8Ctrl-8
Tab9Ctrl-9
ToggleTabsCtrl-M
TogglecommentCtrl-/
ToggleconsoleF6
TogglerecordingAlt-Shift-R
TolowercaseCtrl-Shift-U
TouppercaseCtrl-U
TransposelettersCtrl-T
UndoCtrl-Z
UnfoldAlt-Shift-L
UnfoldallAlt-Shift-0
ZenAlt-Z
ZenslowShift-Alt-Z
\n
\n
\n
\n
" }, { - "filename": "the_editor", - "mtime": 1412172002000, - "pageTitle": "The Editor", - "contents": "\n

The Editor

\n

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:

\n
    \n
  • Undo and Redo support
  • \n
  • Cut, Copy, and Paste functionality
  • \n
  • Line manipulation, including:
      \n
    • Indenting and outdenting
    • \n
    • Moving and copying lines up or down
    • \n
    • Removing lines from any point
    • \n
    • Splitting lines
    • \n
    \n
  • \n
  • Highlighting and commenting blocks of code
  • \n
  • Removing words to the right or the left
  • \n
  • Transposing letters
  • \n
  • Code folding (including the entire file)
  • \n
  • Converting cases
  • \n
  • Multiple cursors
  • \n
  • Autocompletion
  • \n
  • Code analysis and refactoring
  • \n
  • Search in files with regular expressions
  • \n
  • Intelligent selections, including:
      \n
    • Selecting to word right or left
    • \n
    • Selecting to line end or start
    • \n
    • Selecting to document end or start
    • \n
    \n
  • \n
  • Vim and Emacs keybindings
  • \n
  • Line wrapping, to a defined column or the width of the browser window
  • \n
  • Support for a command line
  • \n
  • Support for spaces and real tabs
  • \n
\n\n
" + "filename": "project_bar", + "mtime": 1416491265000, + "pageTitle": "The Project Bar", + "contents": "\n

The Project Bar

\n

Note:

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: \"The

\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.
  • \n
  • Run & Debug lets you run and debug your code live, in the browser. For more information, see the section on "Running and Debugging Your Code".
  • \n
  • Deploy allows you to deploy to a variety of services. For more information, see the section on "Deploying Your Code".
  • \n
  • Preferences lets you change the behavior of the editor. The Preferences documentation is provided on its own page.
  • \n
\n

Clicking on any button expands its menu. Clicking on an expanded menu causes it to collapse, which gives you more room in the IDE to work with.

\n\n
" }, { - "filename": "ide_preferences", - "mtime": 1412172002000, - "pageTitle": "IDE Preferences", - "contents": "

IDE Preferences

\n

Note:

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 \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Preference NameDescription
Enable UI AnimationsEnables or disables fluid animations for various UI elements, such as the Project Bar
Animate ScrollingEnables or disables fluid animations when scrolling through code (such as for goto line)
Enable Auto-SaveIf enabled, automatically saves your files on every change
On Save, Strip WhitespaceWhen saving a file, you can remove all extraneous whitespace from your code lines
Reveal Active File in Project TreeEnabling this jumps the project tree to the active file whenever a tab changes to a different file
Warn Before ExitingPrevents accidental data loss by showing a dialog asking if you really want to leave Cloud9 IDE when closing your browser
Node.js RuntimeDefines 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.
KeybindingsAllows you to choose which operating system to use for keyboard shortcuts
\n

Language Support

\n

This section controls language analysis options:

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n
Preference NameDescription
Enable Hints and Warnings RulesPresents information about your code in the gutter
Highlight Variable InstancesHighlights variable instances in your code
Mark Undeclared VariablesProvides warnings if a variable is being used and has not been declared yet
Mark Unused Function ArgumentsProvides a strikethrough for arguments in a function that are not being used
Warning LevelSpecifies the minimum level of information severity you want provided in the gutter
\n

Code Editor

\n

This section controls language analysis options:

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Preference NameDescription
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 SelectionWhen highlighting lines, this option will highlight all ending whitespace, until the end of the editor window
Highlight Active LinePresents a darker shade in the code editor to indicate which line you're currently on
Highlight Gutter LinePresents a darker shade in the gutter which line you're currently on
Show Invisible CharactersShows invisibles characters in the editor, like tabs and line breaks
Show Indent GuidesShows the indent guides in the editor, letting you see your code's nestings
Show GutterShows the gutter in the editor, which indicates line numbers, warnings, and errors
Highlight Selected WordIf you highlight a word, this highlights all matching words in the editor
Auto-hide Horizontal ScrollWhen 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 ModeWhen enabled, allows you to use vim keybindings in the IDE
Code FoldingWhen enabled, allows you to show or hide "blocks" of code
Fade Fold WidgetsWhen enabled, fades the folding widgets in the gutter
Font SizeChanges the font size of the code in the editor
Show Print MarginShows (and defines) the number of characters possible in line, before it wraps
Soft TabsIndicates how many spaces a single tab represents
Mouse Scroll SpeedDefines the speed of the mouse scrolls
Newline ModeSpecifies the newline mode for the IDE
\n

Terminal

\n

This section controls the behavior for the terminal:

\n
\n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n
Preference NameDescription
ScrollbackSets the scrollback buffer for the terminal
Font FamilySets the font for the terminal
Font SizeSets the font size for the terminal
Blinking CursorSpecifies whether or not you want the cursor to blink
\n

Code Tools

\n

This section controls the various tools that are available in the IDE:

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n
Preference NameDescription
Enable Color PickerMakes the color picker available for use
Preserve Empty LinesWhen enabled, the editor keeps any new lines without text
Keep Array IndentionWhen enabled, tabs and newlines in arrays are preserved. For example, the follow array would remain as-is with this option:\n
\n        var o = [{\n            a: b\n        }, {\n            c: d\n        }];\n        
\n
JSLint Strict WhitespaceIf selected, all brackets are preceded by a space. For example, if(x){ becomes if (x) {, and function(arg){ becomes function (arg) {
BracesThese options control how braces are handled in the IDE:\n
    \n
  • Braces with control statement: braces are left "in-line" alongside the code statements. For example, code is formatted like this:\n
    \n    if (true) {\n        var x = 3;\n    } else {\n        var x = 5;\n    }\n    
    \n
  • \n
  • Braces on own line: braces are always placed on their own line. For example, code is formatted like this:\n
    \n    if (true)\n    {\n        var x = 3;\n    } else\n    {\n        var x = 5;\n    }\n    
    \n
  • \n
  • End braces on own line: only the ending braces have their own line. For example, code is formatted like this:\n
    \n    if (true) {\n        var x = 3;\n    }\n    else {\n        var x = 5;\n    }\n    
    \n
  • \n
\n
\n
" + "filename": "status_bar", + "mtime": 1416491265000, + "pageTitle": "Status Bar", + "contents": "\n

Status Bar

\n

Note:

this feature is deprecated\n\n
\n

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: \"The. 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 \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Preference NameDescription
Show InvisiblesShows invisibles characters in the editor, like tabs and line breaks
Wraps LinesWraps lines according to the line margin defined, or your browser's window. Otherwise, lines run off the current viewport.
Code FoldingWhen enabled, allows you to show or hide "blocks" of code
Full Line SelectionWhen highlighting lines, this option will highlight all ending whitespace, until the end of the editor window
Highlight Active LinePresents a darker shade in the code editor to indicate which line you're currently on
Show Indent GuidesShows the indent guides in the editor, letting you see your code's nestings
Show GutterShows the gutter in the editor, which indicates line numbers, warnings, and errors
Highlight Selected WordIf 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 Scrollbarhen 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 SizeChanges the font size of the code in the editor
Show Print MarginShows (and defines) the number of characters possible in line, before it wraps
Soft TabsIndicates how many spaces a single tab represents
Mouse Scroll SpeedDefines the speed of the mouse scrolls
\n
\n
" }, { "filename": "terminal", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Terminal", "contents": "\n

Terminal

\n

Note:

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
  • \n
\n

\"Screenshot

\n\n
" }, { - "filename": "frameworks_jekyll", - "mtime": 1416998221000, - "pageTitle": "Framework: Jekyll", - "contents": "\n

Framework: Jekyll

\n

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
" + "filename": "tab_functions", + "mtime": 1416491265000, + "pageTitle": "Tab Functions", + "contents": "

Tab Functions

\n

Note:

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

\"The

\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:
\"The

\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.

\n\n
" + }, + { + "filename": "the_editor", + "mtime": 1416491265000, + "pageTitle": "The Editor", + "contents": "\n

The Editor

\n

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:

\n
    \n
  • Undo and Redo support
  • \n
  • Cut, Copy, and Paste functionality
  • \n
  • Line manipulation, including:
      \n
    • Indenting and outdenting
    • \n
    • Moving and copying lines up or down
    • \n
    • Removing lines from any point
    • \n
    • Splitting lines
    • \n
    \n
  • \n
  • Highlighting and commenting blocks of code
  • \n
  • Removing words to the right or the left
  • \n
  • Transposing letters
  • \n
  • Code folding (including the entire file)
  • \n
  • Converting cases
  • \n
  • Multiple cursors
  • \n
  • Autocompletion
  • \n
  • Code analysis and refactoring
  • \n
  • Search in files with regular expressions
  • \n
  • Intelligent selections, including:
      \n
    • Selecting to word right or left
    • \n
    • Selecting to line end or start
    • \n
    • Selecting to document end or start
    • \n
    \n
  • \n
  • Vim and Emacs keybindings
  • \n
  • Line wrapping, to a defined column or the width of the browser window
  • \n
  • Support for a command line
  • \n
  • Support for spaces and real tabs
  • \n
\n\n
" }, { "filename": "index", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Cloud9 IDE User Documentation", - "contents": "{\n \"files\": [\n {\n \"filename\": \"deploying_code\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Deploying Your Code\",\n \"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

\\\"The

\\n

We offer tight integration with the following environments:

\\n\\n

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:

\\n\\n

Warning:

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.
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"deploying_to_heroku\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Deploying to Heroku\",\n \"contents\": \"\\n

Deploying to Heroku

\\n

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

\\\"Showing

\\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

\\\"Dialog

\\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:

\\n
{\\n    \\\"name\\\": \\\"cloud9-heroku-example\\\",\\n    \\\"version\\\": \\\"0.0.1\\\"\\n}
\\n

After you have a package.json file, you might see this dialog:

\\n

\\\"Dialog

\\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

\\\"Console

\\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:
\\\"Windows

\\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:
\\\"Windows

\\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
  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 about your app.

    \\n
  2. \\n
  3. 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
  4. \\n
  5. 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
  6. \\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\\\"Windows

\\n

For more information on configuring your app on the Windows Azure website, see Deploying a Windows Azure App from Cloud9.

\\n\\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.

\\n

Windows Azure Web Sites

\\n

Free and Premium Plans

\\n

In the Console or a Terminal, type the \\nfollowing:

\\n
npm install azure
\\n

Now, you can use the azure command from the Console/Terminal. For more \\ninformation, read the official azure documentation.

\\n

Premium Plans

\\n

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):

\\n
echo \\\"machine code.google.com login EMAIL password PASSWORD\\\" >> ~/.netrc\\ngit remote add appengine REPO
\\n

Note:

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
\\n

NodeJitsu

\\n

Free and Premium Plans

\\n

In the the Console or a Terminal, type:

\\n
npm install jitsu@0.7.x -g\\nmkdir node_modules\\nmv ../lib/node_modules/jitsu node_modules
\\n

Now, you can run jitsu from the command line. For more information, see \\nthe official jitsu documentation.

\\n

Premium Plans

\\n
npm install jitsu@0.7.x -g
\\n

You can now run jitsu from both the Console and the Terminal.

\\n

Modulus

\\n

In the the Console or a Terminal, type:

\\n
npm install modulus -g
\\n

Now, you can run modulus from the command line. For more information, see \\nthe official modulus documentation.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"faq_general\",\n \"mtime\": 1416998245000,\n \"pageTitle\": \"FAQ: General\",\n \"contents\": \"\\n
\\n

FAQ: General

\\n

Can I use FTP workspaces on Cloud9?

\\n

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.

\\n

How do I deploy to Heroku/Openshift/Azure/...?

\\n

See Deploying via CLI.

\\n

Can I connect to SMTP servers (port 25)?

\\n

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 -d 1 -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
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"faq_ssh\",\n \"mtime\": 1416998221000,\n \"pageTitle\": \"FAQ: SSH workspaces\",\n \"contents\": \"\\n
\\n

FAQ: SSH workspaces

\\n

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"

\\n

Try executing the following command:

\\n
yum install ncurses-devel 
\\n

or

\\n
yum install glibc-static 
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"faq_php\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"FAQ: PHP\",\n \"contents\": \"\\n
\\n

FAQ: PHP

\\n

where are the Apache logs?

\\n

By default the logs are in ~/lib/apache2/log

\\n

Is mail() supported?

\\n

No, this is currently not supported; see FAQ: General about SMTP access.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"faq_python\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"FAQ: Python\",\n \"contents\": \"\\n
\\n

FAQ: Python

\\n

Why does easy_install report a permission_denied error?

\\n

Please use sudo easy_install instead.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"colorpicker\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Color Picker\",\n \"contents\": \"\\n

Color Picker

\\n

Note:

this feature is deprecated\\n\\n
\\n
\\n\\n
\\n\\n

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: \\\"Color

\\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:
\\\"Color

\\n

To set the value, just click anywhere outside of the color picker.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"language_analysis\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Language Analysis\",\n \"contents\": \"\\n
\\n

Language Analysis

\\n

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 (\\\"Little): these are non-critical, non-dangerous updates about your code
  • \\n
  • Warnings (\\\"Warning): these are potentially incorrect pieces of code
  • \\n
  • Errors (\\\"Error): 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:
\\\"fs

\\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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"autocompletion\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Code Autocompletion\",\n \"contents\": \"\\n

Code Autocompletion

\\n

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

\\\"Autocompletion

\\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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"custom_runners\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Custom Runners\",\n \"contents\": \"\\n
\\n

Custom Runners

\\n

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.

\\n
{\\n    \\\"cmd\\\": [\\\"go\\\", \\\"run\\\", \\\"$file\\\", \\\"$args\\\"],\\n    \\\"selector\\\": \\\"source.go\\\",\\n    \\\"info\\\": \\\"Your code is running :)\\\"\\n}
\\n

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.

    \\n
  • \\n
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"gotofile_and_definition\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Using Goto File and Goto Definition\",\n \"contents\": \"\\n

Using Goto File and Goto Definition

\\n

Note:

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

\\\"Goto

\\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

\\\"Goto

\\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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"collaboration\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Collaboration\",\n \"contents\": \"\\n
\\n

Collaboration

\\n

Note:

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

\\\"The

\\n

If you are the owner of a project, you can click on anyone's username to grant (or revoke) write access:

\\n

\\\"Granting

\\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:
\\\"Search

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"multiple_cursors\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Multiple Cursors\",\n \"contents\": \"\\n

Multiple Cursors

\\n

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

\\\"Showing

\\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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"supported_languages\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Supported Languages\",\n \"contents\": \"\\n
\\n

Supported Languages

\\n

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.

\\n

See Syntax Highlighting & Themes for more \\ninfo.

\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n

Running apps

\\n

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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"syntax_highlighting_themes\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Syntax Higlighting and Themes\",\n \"contents\": \"\\n

Syntax Higlighting and Themes

\\n
\\n\\n

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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"uploading_downloading\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Uploading and Downloading Workspace Files\",\n \"contents\": \"\\n

Uploading and Downloading Workspace Files

\\n

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

\\\"Uploading

\\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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_drupal\",\n \"mtime\": 1416998221000,\n \"pageTitle\": \"Framework: Drupal\",\n \"contents\": \"\\n

Framework: Drupal

\\n

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

\\\"Drupal

\\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

\\\"Drupal

\\n

Now fill the form with the correct site information:

\\n

\\\"Drupal

\\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
\\n

\\\"Drupal

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"git_blame\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Git Blame\",\n \"contents\": \"\\n

Git Blame

\\n

Note:

this feature is deprecated\\n\\n
\\n
\\n\\n
\\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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"zen_mode\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Activating Zen Mode\",\n \"contents\": \"\\n

Activating Zen Mode

\\n

Note:

this feature is deprecated\\n\\n
\\n
\\n\\n
\\n\\n

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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_ionic\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Framework: Ionic\",\n \"contents\": \"\\n

Framework: Ionic

\\n

Ionic is an open source front-end framework for developing hybrid mobile apps with HTML5.

\\n

Create a Ionic app as follows:

\\n
    \\n
  1. Create a new workspace (Node.js or Custom for a clean workspace)
  2. \\n
  3. Open a Terminal, or use the pre-existing one at the bottom
  4. \\n
  5. Run the following commands in the Terminal:

    \\n
     $ npm install -g cordova ionic\\n $ ionic start myApp sidemenu\\n $ cd myApp\\n $ ionic serve $PORT
    \\n
  6. \\n
  7. 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
  8. \\n
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_ghost\",\n \"mtime\": 1416995769000,\n \"pageTitle\": \"Framework: Ghost\",\n \"contents\": \"\\n

Framework: Ghost

\\n

Ghost is a simple, powerful publishing platform that \\nallows you to share your story with the world.

\\n

Create a Ghost blog as follows:

\\n
    \\n
  1. Create a new workspace (Node.js or Custom for a clean workspace)
  2. \\n
  3. Open a Terminal, or use the pre-existing one at the bottom
  4. \\n
  5. Run the following commands in the Terminal:

    \\n
     $ curl -L https://ghost.org/zip/ghost-latest.zip -o ghost.zip\\n $ unzip -uo ghost.zip -d .\\n $ rm ghost.zip\\n $ npm install --production
    \\n
  6. \\n
  7. Adapt the config.js file to the Cloud9 environment. Change the following keys:

    \\n
     config: {\\n     development: {\\n         url: 'https://' + process.env.C9_HOSTNAME,\\n     },\\n     server: {\\n         host: process.env.IP,\\n         port: process.env.PORT\\n     }\\n }
    \\n
  8. \\n
  9. Run Ghost by typing npm start in the console or by opening index.js and\\nhitting the run button.

    \\n
  10. \\n
  11. 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
  12. \\n
\\n

Change the URL to /ghost and create your admin user to login to the Ghost admin interface

\\n

Note:

These instructions are based on the official Ghost Installation Guide\\n
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_joomla\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Joomla\",\n \"contents\": \"\\n
\\n

Joomla

\\n

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
\\n

Download Joomla

\\n
    \\n
  1. Create a Cloud9 workspace of type "Custom" or "PHP"
  2. \\n
  3. Download and Unzip Joomla from the Terminal. You can find the latest version on the Joomla website

    \\n
     wget http://joomlacode.org/gf/download/frsrelease/19665/160049/Joomla_3.3.3-Stable-Full_Package.zip\\n unzip Joomla*.zip\\n rm Joomla*.zip
    \\n
  4. \\n
\\n

Start the database

\\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
  1. Pop out the Preview by clicking the Popout icon \\\"Preview (or copy & load the URL in a browser tab)
  2. \\n
  3. Change the URL from https:// to http:// and load it
  4. \\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

\\\"Joomla

\\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

\\\"Joomla

\\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!

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"revisions\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Revisions\",\n \"contents\": \"\\n

Revisions

\\n

Note:

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: \\\"Revisions

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_koa\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Framework: Koa\",\n \"contents\": \"\\n

Framework: Koa

\\n

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.

\\n

(Credits go to Tom at http://kyorcode.blogspot.nl/2014/08/running-koajs-in-cloud9.html)

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_express\",\n \"mtime\": 1416998221000,\n \"pageTitle\": \"Framework: Express\",\n \"contents\": \"\\n
\\n

Framework: Express

\\n

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:

\\n
$ npm install -g express-generator\\n$ express -f .\\n$ npm install
\\n

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
  1. Click Run -> Run Configurations -> Manage ...
  2. \\n
  3. Click Add New Config
  4. \\n
  5. In the run panel fill in Express as name, bin/www as the command and Node 0.10.x as the runner.
  6. \\n
  7. 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.
  8. \\n
\\n

The finished run configuration should look something like this

\\n

\\\"Express

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_laravel\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Framework: Laravel\",\n \"contents\": \"\\n

Framework: Laravel

\\n

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:

\\n
rm README.md php.ini hello-world.php\\ncomposer create-project laravel/laravel ./laravel --prefer-dist\\nshopt -s dotglob\\nmv laravel/* ./\\nrm -rf laravel
\\n

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.

\\n

\\\"Run

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_meteor\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Framework: Meteor\",\n \"contents\": \"\\n

Framework: Meteor

\\n

Meteor is an open-source platform for building web apps.

\\n

Create a Meteor app as follows:

\\n
    \\n
  1. Create a new workspace (Node.js or Custom for a clean workspace)
  2. \\n
  3. Open a Terminal, or using the pre-existing one at the bottom
  4. \\n
  5. Run the following commands in the Terminal:

    \\n
     curl https://install.meteor.com/ | sh\\n meteor create ./my_cool_app\\n cd my_cool_app/\\n meteor --port $IP:$PORT
    \\n
  6. \\n
  7. 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
  8. \\n
\\n

Note:

Alternatively, for the last step, click on the link that's displayed in the terminal, and change it in the resulting Preview to http://127.0.0.1:8080.
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_symfony2\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Framework: Symfony2 \",\n \"contents\": \"\\n
\\n

Framework: Symfony2

\\n

Symfony is one of the leading PHP Webframeworks. It is Open-Source and built on top of the Symfony Components.

\\n

Getting started

\\n
    \\n
  1. Create a Cloud9 workspace of the type "Custom" or "PHP"
  2. \\n
  3. Install the Intl extension for PHP that is required in most of the Symfony2 projects

    \\n
     sudo apt-get install php5-intl
    \\n
  4. \\n
  5. Set a valid PHP timezone

    \\n
     echo 'date.timezone = UTC' | sudo tee --append /etc/php5/apache2/php.ini
    \\n
  6. \\n
  7. Starting MySQL-Server

    \\n
     sudo mysql-ctl install\\n sudo mysql-ctl start
    \\n
  8. \\n
\\n

Create a Symfony-Project

\\n

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.

\\n
    rm README.md php.ini hello-world.php\\n    composer create-project symfony/framework-standard-edition symfony/ \\\"2.5.*\\\"\\n    mv symfony/{*,.*} ./ \\n    rm -rf symfony
\\n

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.0 403 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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"run_an_application\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Run an application\",\n \"contents\": \"\\n
\\n

Run an application

\\n

On Hosted and SSH workspaces, Cloud9 provides two ways to run your application:

\\n
    \\n
  1. Using the Run panel with built-in Runners for many languages
  2. \\n
  3. From a Terminal
  4. \\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

\\\"Run

\\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

\\\"Run

\\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
  • \\n
  • Environment: Set environment variables
  • \\n
  • \\n
\\n

Tip:

If you can't find the Runner you need from the default set, you can create your own custom Runner.\\n\\n
\\n

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
  1. 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.
  2. \\n
  3. 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.
  4. \\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 note of 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:

\\n
$ mysql-ctl cli\\nWelcome to the MySQL monitor.  Commands end with ; or \\\\g.\\nYour MySQL connection id is 24\\nServer version: 5.5.37-0ubuntu0.14.04.1 (Ubuntu)\\n\\nCopyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.\\n\\nOracle is a registered trademark of Oracle Corporation and/or its\\naffiliates. Other names may be trademarks of their respective\\nowners.\\n\\nType 'help;' or '\\\\h' for help. Type '\\\\c' to clear the current input statement.\\n\\nmysql>  show databases;\\n+--------------------+\\n| Database           |\\n+--------------------+\\n| information_schema |\\n| c9                 |\\n| mysql              |\\n| performance_schema |\\n+--------------------+\\n4 rows in set (0.15 sec)
\\n

MongoDB

\\n

From the Terminal, run the following command:

\\n
$ mongod --bind_ip=$IP --nojournal
\\n

The output will include:

\\n
...\\nwaiting for connections on port 27017
\\n

Now you can open the mongo shell in a new Terminal, running following command:

\\n
$ mongo
\\n

To stop the MongoDB instance press Control+C in the Terminal where mongod is running.\\nNow have a look at the currently used database:

\\n
$ mongo\\nmongo> db\\ntest
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"dashboard\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"The Dashboard\",\n \"contents\": \"\\n

The Dashboard

\\n

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

\\\"An

\\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

\\\"A

\\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
  • \\n
\\n

Clicking on the \\\"Project next to MY PROJECTS lets you:

\\n
    \\n
  • Create a new project
  • \\n
  • Clone from URL
  • \\n
\\n

\\\"Creating

\\n

For more information on creating new workspaces, see this section of the documentation.

\\n

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: \\\"Refresh

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"create_a_workspace\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Create a Workspace\",\n \"contents\": \"\\n

Create a Workspace

\\n

Cloud9 supports three types of workspaces:

\\n
    \\n
  1. Hosted
  2. \\n
  3. FTP
  4. \\n
  5. SSH
  6. \\n
\\n

"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

\\\"New

\\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

\\\"Options

\\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

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

\\\"Options

\\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:

\\n

\\\"New

\\n

Now, just click Start Editing to get started!

\\n

Next up, read how to run an application and set up a database.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"ide_overview\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"IDE Overview\",\n \"contents\": \"\\n
\\n

IDE Overview

\\n

Note:

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

\\\"IDE

\\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:
\\\"Hiding

\\n

The Top Menu Bar

\\n

\\\"A

\\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.

\\n

In the middle of the menu bar you'll find the debug button: \\\"The. This is used for running and debugging your code. For more information, see the section on "Running and Debugging Your Code"..

\\n

\\n

The preview button \\\"The 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: \\\"Autosave. 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 \\\"Tab 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.

\\n

At the lower-right corner, you can find the status bar.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"share_a_workspace\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Share a workspace\",\n \"contents\": \"\\n
\\n

Share a workspace

\\n

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

\\\"Share

\\n

Here's what you see when you pull up the Share dialog:

\\n

\\\"Share

\\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

\\\"Collaboration

\\n

In order to share your entire development environment, do one of the following:

\\n
    \\n
  1. Make the URL publicly available to everyone: check the "Public" checkbox for the "Editor" in the "Links to Share" section.
  2. \\n
  3. Choose to share only with specific people: invite them from the "Invite people" section.
  4. \\n
  5. Grant/revoke access rights in the "Who has access" section.
  6. \\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.
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"console\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"The Console\",\n \"contents\": \"\\n
\\n

The Console

\\n

Note:

this feature is deprecated\\n\\n
\\n

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:

\\n\\n

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:

\\n\\n

Output

\\n

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:
\\\"Screenshot

\\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: \\\"Running

\\n

If you hover over this message, you can opt to cancel the process by clicking on the button: \\\"Cancelling

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_angularjs\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Framework AngularJS\",\n \"contents\": \"\\n

Framework AngularJS

\\n

AngularJS lets you write client-side web \\napplications as if you had a smarter browser.

\\n

Follow these steps to create an AngularJS application using the official project\\ntemplate:

\\n
    \\n
  1. Create a workspace and choose the PHP workspace type
  2. \\n
  3. Open a Terminal, or using the pre-existing one at the bottom
  4. \\n
  5. Run the following commands in the Terminal:
    rm -rf * .c9\\ngit clone https://github.com/angular/angular-seed.git .\\nnpm install\\nmv package.json package.json.bak\\njq '.scripts.start=\\\"http-server -a $IP -p $PORT\\\"' package.json.bak > package.json
    \\n
  6. \\n
  7. Click the Run Project button in the top menu of the IDE
  8. \\n
  9. Check the README.md for further steps
  10. \\n
\\n

Note:

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.
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"keybindings\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Commands and Keybindings\",\n \"contents\": \"\\n

Commands and Keybindings

\\n

Note:

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!

\\n
\\n \\n
\\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
Command NameKeybinding
Abortclicommand˄-C
AddCursorAbove˄-⌥-Up
AddCursorAboveSkipCurrent˄-⌥-⇧-Up
AddCursorBelow˄-⌥-Down
AddCursorBelowSkipCurrent˄-⌥-⇧-Down
Backspace˄-⌫
Beautify⌘-⇧-B
Clearcut
Closeallbutme⌥-˄-W
Closealltabs⌥-⇧-W
Closetab⌥-W
Complete˄-Space
Copy⌘-C
Copylinesdown⌘-⌥-Down
Copylinesup⌘-⌥-Up
Cut⌘-X
DelDelete
DuplicateSelection⌘-⇧-D
Escapeconsole
EvalInteractive⌘-Return
Find⌘-F
Findnext⌘-G
Findprevious⌘-⇧-G
Fold⌘-⌥-L
Foldall⌘-⌥-0
GolinedownDown
GolineupUp
Gotoend⌘-End
Gotofile⌘-E
GotoleftLeft
Gotoline⌘-L
Gotolineend⌘-Right
Gotolinestart⌘-Left
GotopagedownPageDown
GotorightRight
Gotostart⌘-Home
Gototableft⌘-[
Gototabright⌘-]
Gotowordleft⌥-Left
Gotowordright⌥-Right
IndentTab
Jumptomatching˄-⇧-P
Largerfont˄-⇧-.
Movelinesdown⌥-Down
Movelinesup⌥-Up
Movetableft⌘-⌥-[
Movetabright⌘-⌥-]
Newfile⌥-⇧-N
Newfiletemplate⌥-˄-N
Newfolder⌥-˄-⇧-N
Nexttab⌥-Tab
Openfilepanel⇧-⌘-U
Opensettingspanel⌘-,
Opentreepanel⌘-U
Outdent⇧-Tab
Outline⌘-⇧-E
Paste⌘-V
Previoustab⌥-⇧-Tab
Quicksave⌘-S
Quickwatch⌥-Q
Redo⌘-⇧-Z
Removeline⌘-D
Removetolineend˄-K
Removetolinestart⌘-⌫
Removewordleft⌥-⌫
Removewordright⌥-Delete
RenameVar⌥-⌘-R
Replace⌥-⌘-F
Replaymacro⌘-˄-R
ResumeF8
Revealtab⇧-⌘-L
Reverttosaved˄-⇧-Q
Revisionpanel⌘-B
RunF5
Saveas⌘-⇧-S
Savetabsession⇧-˄-S
Searchinfiles⇧-⌘-F
SelectMoreAfter˄-⌥-Right
SelectMoreBefore˄-⌥-Left
SelectNextAfter˄-⌥-⇧-Right
SelectNextBefore˄-⌥-⇧-Left
Selectall⌘-A
Selectdown⇧-Down
Selectleft⇧-Left
Selectright⇧-Right
Selecttoend⌘-⇧-Down
Selecttolineend⌘-⇧-Right
Selecttolinestart⌘-⇧-Left
Selecttostart⌘-⇧-Up
Selectup⇧-Up
Selectwordleft⌥-⇧-Left
Selectwordright⌥-⇧-Right
Smallerfont˄-⇧-,
SplitIntoLines˄-⇧-L
StepintoF11
Stepout⇧-F11
StepoverF10
Stop⇧-F5
Switchconsole⇧-⎋
Tab0⌘-0
Tab1⌘-1
Tab2⌘-2
Tab3⌘-3
Tab4⌘-4
Tab5⌘-5
Tab6⌘-6
Tab7⌘-7
Tab8⌘-8
Tab9⌘-9
ToggleTabs˄-M
Togglecomment⌘-/
Toggleconsole˄-⎋
Togglerecording⌘-⇧-R
Tolowercase˄-⇧-U
Touppercase˄-U
Transposeletters˄-T
Undo⌘-Z
Unfold⌘-⌥-⇧-L
Unfoldall⌘-⌥-⇧-0
Zen⌥-Z
Zenslow⇧-⌥-Z
\\n
\\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
Command NameKeybinding
AbortclicommandCtrl-C
AddCursorAboveCtrl-Alt-Up
AddCursorAboveSkipCurrentCtrl-Alt-Shift-Up
AddCursorBelowCtrl-Alt-Down
AddCursorBelowSkipCurrentCtrl-Alt-Shift-Down
BackspaceCommand-Backspace
BeautifyShift-Ctrl-B
ClearcutESC
CloseallbutmeCtrl-Alt-W
ClosealltabsCtrl-Shift-W
ClosetabCtrl-W
CompleteCtrl-Space
CopyCtrl-C
CopylinesdownAlt-Shift-Down
CopylinesupAlt-Shift-Up
CutCtrl-X
DelDelete
DuplicateSelectionCtrl-Shift-D
EscapeconsoleEsc
EvalInteractiveCtrl-Return
FindCtrl-F
FindnextCtrl-K
FindpreviousCtrl-Shift-K
FoldAlt-L
FoldallAlt-0
GolinedownDown
GolineupUp
GotoendCtrl-End
GotofileCtrl-E
GotoleftLeft
GotolineCtrl-G
GotolineendAlt-Right
GotolinestartAlt-Left
GotopagedownPageDown
GotorightRight
GotostartCtrl-Home
GototableftCtrl-[
GototabrightCtrl-]
GotowordleftCtrl-Left
GotowordrightCtrl-Right
IndentTab
JumptomatchingCtrl-P
LargerfontCtrl-Shift-.
MovelinesdownAlt-Down
MovelinesupAlt-Up
MovetableftCtrl-Alt[
MovetabrightCtrl-Alt-]
NewfileCtrl-N
NewfiletemplateCtrl-Alt-N
NewfolderCtrl-N
NexttabCtrl-Tab
OpenfilepanelShift-Ctrl-U
OpensettingspanelCtrl-,
OpentreepanelCtrl-U
OutdentShift-Tab
OutlineCtrl-Shift-E
PasteCtrl-V
PrevioustabCtrl-Shift-Tab
QuicksaveCtrl-S
QuickwatchAlt-Q
RedoCtrl-Shift-Z
RemovelineCtrl-D
RemovetolineendAlt-Delete
RemovetolinestartAlt-Backspace
RemovewordleftCtrl-Backspace
RemovewordrightCtrl-Delete
RenameVarCtrl-Alt-R
ReplaceAlt-Shift-F
ReplaymacroAlt-R
ResumeF8
RevealtabCtrl-Shift-L
ReverttosavedCtrl-Shift-Q
RevisionpanelCtrl-B
RunF5
SaveasCtrl-Shift-S
SavetabsessionShift-Ctrl-S
SearchinfilesCtrl-Shift-F
SelectMoreAfterCtrl-Alt-Right
SelectMoreBeforeCtrl-Alt-Left
SelectNextAfterCtrl-Alt-Shift-Right
SelectNextBeforeCtrl-Alt-Shift-Left
SelectallCtrl-A
SelectdownShift-Down
SelectleftShift-Left
SelectrightShift-Right
SelecttoendCtrl-Shift-End
SelecttolineendAlt-Shift-Right
SelecttolinestartAlt-Shift-Left
SelecttostartCtrl-Shift-Home
SelectupShift-Up
SelectwordleftCtrl-Shift-Left
SelectwordrightCtrl-Shift-Right
SmallerfontCtrl-Shift-,
SplitIntoLinesCtrl-Shift-L
StepintoF11
StepoutShift-F11
StepoverF10
StopShift-F5
SwitchconsoleShift-Esc
Tab0Ctrl-0
Tab1Ctrl-1
Tab2Ctrl-2
Tab3Ctrl-3
Tab4Ctrl-4
Tab5Ctrl-5
Tab6Ctrl-6
Tab7Ctrl-7
Tab8Ctrl-8
Tab9Ctrl-9
ToggleTabsCtrl-M
TogglecommentCtrl-/
ToggleconsoleF6
TogglerecordingAlt-Shift-R
TolowercaseCtrl-Shift-U
TouppercaseCtrl-U
TransposelettersCtrl-T
UndoCtrl-Z
UnfoldAlt-Shift-L
UnfoldallAlt-Shift-0
ZenAlt-Z
ZenslowShift-Alt-Z
\\n
\\n
\\n
\\n
\\n
\\n \"\n },\n {\n \"filename\": \"the_editor\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"The Editor\",\n \"contents\": \"\\n

The Editor

\\n

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:

\\n
    \\n
  • Undo and Redo support
  • \\n
  • Cut, Copy, and Paste functionality
  • \\n
  • Line manipulation, including:
      \\n
    • Indenting and outdenting
    • \\n
    • Moving and copying lines up or down
    • \\n
    • Removing lines from any point
    • \\n
    • Splitting lines
    • \\n
    \\n
  • \\n
  • Highlighting and commenting blocks of code
  • \\n
  • Removing words to the right or the left
  • \\n
  • Transposing letters
  • \\n
  • Code folding (including the entire file)
  • \\n
  • Converting cases
  • \\n
  • Multiple cursors
  • \\n
  • Autocompletion
  • \\n
  • Code analysis and refactoring
  • \\n
  • Search in files with regular expressions
  • \\n
  • Intelligent selections, including:
      \\n
    • Selecting to word right or left
    • \\n
    • Selecting to line end or start
    • \\n
    • Selecting to document end or start
    • \\n
    \\n
  • \\n
  • Vim and Emacs keybindings
  • \\n
  • Line wrapping, to a defined column or the width of the browser window
  • \\n
  • Support for a command line
  • \\n
  • Support for spaces and real tabs
  • \\n
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"ide_preferences\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"IDE Preferences\",\n \"contents\": \"\\n
\\n

IDE Preferences

\\n

Note:

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 \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
Preference NameDescription
Enable UI AnimationsEnables or disables fluid animations for various UI elements, such as the Project Bar
Animate ScrollingEnables or disables fluid animations when scrolling through code (such as for goto line)
Enable Auto-SaveIf enabled, automatically saves your files on every change
On Save, Strip WhitespaceWhen saving a file, you can remove all extraneous whitespace from your code lines
Reveal Active File in Project TreeEnabling this jumps the project tree to the active file whenever a tab changes to a different file
Warn Before ExitingPrevents accidental data loss by showing a dialog asking if you really want to leave Cloud9 IDE when closing your browser
Node.js RuntimeDefines 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.
KeybindingsAllows you to choose which operating system to use for keyboard shortcuts
\\n

Language Support

\\n

This section controls language analysis options:

\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n \\n \\n \\n \\n \\n \\n \\n
Preference NameDescription
Enable Hints and Warnings RulesPresents information about your code in the gutter
Highlight Variable InstancesHighlights variable instances in your code
Mark Undeclared VariablesProvides warnings if a variable is being used and has not been declared yet
Mark Unused Function ArgumentsProvides a strikethrough for arguments in a function that are not being used
Warning LevelSpecifies the minimum level of information severity you want provided in the gutter
\\n

Code Editor

\\n

This section controls language analysis options:

\\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
Preference NameDescription
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 SelectionWhen highlighting lines, this option will highlight all ending whitespace, until the end of the editor window
Highlight Active LinePresents a darker shade in the code editor to indicate which line you're currently on
Highlight Gutter LinePresents a darker shade in the gutter which line you're currently on
Show Invisible CharactersShows invisibles characters in the editor, like tabs and line breaks
Show Indent GuidesShows the indent guides in the editor, letting you see your code's nestings
Show GutterShows the gutter in the editor, which indicates line numbers, warnings, and errors
Highlight Selected WordIf you highlight a word, this highlights all matching words in the editor
Auto-hide Horizontal ScrollWhen 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 ModeWhen enabled, allows you to use vim keybindings in the IDE
Code FoldingWhen enabled, allows you to show or hide "blocks" of code
Fade Fold WidgetsWhen enabled, fades the folding widgets in the gutter
Font SizeChanges the font size of the code in the editor
Show Print MarginShows (and defines) the number of characters possible in line, before it wraps
Soft TabsIndicates how many spaces a single tab represents
Mouse Scroll SpeedDefines the speed of the mouse scrolls
Newline ModeSpecifies the newline mode for the IDE
\\n

Terminal

\\n

This section controls the behavior for the terminal:

\\n
\\n \\n \\n \\n \\n \\n \\n \\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n \\n \\n \\n
Preference NameDescription
ScrollbackSets the scrollback buffer for the terminal
Font FamilySets the font for the terminal
Font SizeSets the font size for the terminal
Blinking CursorSpecifies whether or not you want the cursor to blink
\\n

Code Tools

\\n

This section controls the various tools that are available in the IDE:

\\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n \\n \\n
Preference NameDescription
Enable Color PickerMakes the color picker available for use
Preserve Empty LinesWhen enabled, the editor keeps any new lines without text
Keep Array IndentionWhen enabled, tabs and newlines in arrays are preserved. For example, the follow array would remain as-is with this option:\\n
\\n        var o = [{\\n            a: b\\n        }, {\\n            c: d\\n        }];\\n        
\\n
JSLint Strict WhitespaceIf selected, all brackets are preceded by a space. For example, if(x){ becomes if (x) {, and function(arg){ becomes function (arg) {
BracesThese options control how braces are handled in the IDE:\\n
    \\n
  • Braces with control statement: braces are left "in-line" alongside the code statements. For example, code is formatted like this:\\n
    \\n    if (true) {\\n        var x = 3;\\n    } else {\\n        var x = 5;\\n    }\\n    
    \\n
  • \\n
  • Braces on own line: braces are always placed on their own line. For example, code is formatted like this:\\n
    \\n    if (true)\\n    {\\n        var x = 3;\\n    } else\\n    {\\n        var x = 5;\\n    }\\n    
    \\n
  • \\n
  • End braces on own line: only the ending braces have their own line. For example, code is formatted like this:\\n
    \\n    if (true) {\\n        var x = 3;\\n    }\\n    else {\\n        var x = 5;\\n    }\\n    
    \\n
  • \\n
\\n
\\n
\\n
\\n \"\n },\n {\n \"filename\": \"terminal\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Terminal\",\n \"contents\": \"\\n

Terminal

\\n

Note:

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
  • \\n
\\n

\\\"Screenshot

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_jekyll\",\n \"mtime\": 1416998221000,\n \"pageTitle\": \"Framework: Jekyll\",\n \"contents\": \"\\n

Framework: Jekyll

\\n

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:

\\n\\n

Getting More Help

\\n

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:

\\n\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"setting_up_hosted_mysql\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"MySQL\",\n \"contents\": \"\\n
\\n

MySQL

\\n

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
  • \\n
  • Cross-platform support
  • \\n
  • Stored procedures
  • \\n
  • Triggers
  • \\n
  • Cursors
  • \\n
  • Updatable Views
  • \\n
  • Information schema
  • \\n
  • Many more
  • \\n
\\n

Using MySQL with Cloud9

\\n

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
  1. Register with Xeround
  2. \\n
  3. Log in to your controlpanel
  4. \\n
  5. Choose 'create new'
  6. \\n
  7. Choose a datacenter
  8. \\n
  9. Enter your Database name, Username and Password and create
  10. \\n
  11. Select your newly created instance and click the 'External DNS Hostname' link provided to log into PHPMyAdmin
  12. \\n
  13. Create and import/setup your database
  14. \\n
\\n

Cloud9

\\n
    \\n
  1. Log into your account
  2. \\n
  3. Create a new project (or use an existing one)
  4. \\n
  5. 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         ?>
    \\n
  6. \\n
  7. Save the file
  8. \\n
  9. Run the file
  10. \\n
\\n

Source

\\n

Courtesy of Roger Qui of Polycadamy. This guide is elaborately explained in a video tutorial

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"project_bar\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"The Project Bar\",\n \"contents\": \"\\n

The Project Bar

\\n

Note:

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: \\\"The

\\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.
  • \\n
  • Run & Debug lets you run and debug your code live, in the browser. For more information, see the section on "Running and Debugging Your Code".
  • \\n
  • Deploy allows you to deploy to a variety of services. For more information, see the section on "Deploying Your Code".
  • \\n
  • Preferences lets you change the behavior of the editor. The Preferences documentation is provided on its own page.
  • \\n
\\n

Clicking on any button expands its menu. Clicking on an expanded menu causes it to collapse, which gives you more room in the IDE to work with.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"tab_functions\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Tab Functions\",\n \"contents\": \"\\n
\\n

Tab Functions

\\n

Note:

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

\\\"The

\\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:
\\\"The

\\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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"status_bar\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Status Bar\",\n \"contents\": \"\\n

Status Bar

\\n

Note:

this feature is deprecated\\n\\n
\\n

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: \\\"The. 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 \\n \\n \\n \\n \\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
Preference NameDescription
Show InvisiblesShows invisibles characters in the editor, like tabs and line breaks
Wraps LinesWraps lines according to the line margin defined, or your browser's window. Otherwise, lines run off the current viewport.
Code FoldingWhen enabled, allows you to show or hide "blocks" of code
Full Line SelectionWhen highlighting lines, this option will highlight all ending whitespace, until the end of the editor window
Highlight Active LinePresents a darker shade in the code editor to indicate which line you're currently on
Show Indent GuidesShows the indent guides in the editor, letting you see your code's nestings
Show GutterShows the gutter in the editor, which indicates line numbers, warnings, and errors
Highlight Selected WordIf 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 Scrollbarhen 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 SizeChanges the font size of the code in the editor
Show Print MarginShows (and defines) the number of characters possible in line, before it wraps
Soft TabsIndicates how many spaces a single tab represents
Mouse Scroll SpeedDefines the speed of the mouse scrolls
\\n
\\n
\\n
\\n \"\n },\n {\n \"filename\": \"setting_up_mysql\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"MySQL\",\n \"contents\": \"\\n
\\n

MySQL

\\n

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
  • \\n
  • Cross-platform support
  • \\n
  • Stored procedures
  • \\n
  • Triggers
  • \\n
  • Cursors
  • \\n
  • Updatable Views
  • \\n
  • Information schema
  • \\n
  • Many more
  • \\n
\\n

Using MySQL with Cloud9

\\n

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 \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
Option\\n Value\\n Comment\\n
Hostname$IPThe same local IP as the application you run on Cloud9
Port3306The default MySQL port number
User$C9_USERYour Cloud9 user name
Password-No password since you can only access the DB from within the workspace
Databasec9The database name
\\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
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"common_errors\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Common errors\",\n \"contents\": \"\\n
\\n

Common errors

\\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:

\\n
COMMAND PID   USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME\\napache2 699 ubuntu    4u  IPv6 83213152      0t0  TCP *:http-alt (LISTEN)
\\n

You now can kill that proccess. Make sure you replace PID with the ID of the process.

\\n
// Kill the process\\nkill -9 PID
\\n

For the console wizards:

\\n
kill -9 $(lsof -i:$PORT -t)
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"setting_up_mongodb\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"MongoDB\",\n \"contents\": \"\\n
\\n

MongoDB

\\n

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.

\\n
$ mkdir data\\n$ echo 'mongod --bind_ip=$IP --dbpath=data --nojournal --rest \\\"$@\\\"' > mongod\\n$ chmod a+x mongod
\\n

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:

\\n

Node.JS apps

\\n

Mongoose
\\nNode-Mongodb-Native

\\n

Shell Access

\\n

To access a shell prompt for the above MongoDB run the following.

\\n
$ mongo
\\n

Check out docs.mongodb.org for details on how to use the shell

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"creating_coffeescript_app\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Create a CoffeeScript Project\",\n \"contents\": \"\\n

Create a CoffeeScript Project

\\n

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:

\\n
git clone git://github.com/fjakobs/cloud9-coffeescript-example.git
\\n

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:

\\n
http = require \\\"http\\\"\\n\\nmodule.exports = http.createServer((req, res) ->\\n    res.writeHead 200, 'Content-Type': 'text/plain'\\n    res.end 'Hello World\\\\n'
\\n

Next, run the server.js file and open the URL indicated in the console:

\\n

\\\"Messages

\\n

The result is:

\\n

\\\"The

\\n

To stop your application, go back to the editor and click on the \\\"Icon button in the Menu Bar.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"editing_wordpress_sites\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Editing Remote WordPress Websites via FTP\",\n \"contents\": \"\\n

Editing Remote WordPress Websites via FTP

\\n
\\n\\n
\\n\\n

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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"setting_up_postgresql\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"PostgreSQL\",\n \"contents\": \"\\n
\\n

PostgreSQL

\\n

Installing PostgreSQL on a Cloud9 workspace

\\n

PostgreSQL comes preinstalled on every Cloud9 workspace, yay.

\\n

Start the PostgreSQL service

\\n
$ sudo service postgresql start
\\n

Set the "postgres" user password

\\n
$ sudo sudo -u postgres psql                                                                                  \\npsql (9.3.4, server 9.3.5)\\nType \\\"help\\\" for help.\\n\\npostgres=# \\\\password\\nEnter new password: \\nEnter it again: \\npostgres=# \\\\q
\\n

Connect to the service

\\n
$ sudo sudo -u postgres psql                                                                                  
\\n

Create a PostgreSQL database

\\n

Make sure you have logged into the PostgreSQL terminal and then you can just run:

\\n
$ sudo sudo -u postgres psql                                                                                  \\npostgres=# create database \\\"groceries\\\";
\\n

List all databases

\\n
$ sudo sudo -u postgres psql                                                                                  \\npostgres=# \\\\list
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"installing_npm_modules\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Installing NPM Modules\",\n \"contents\": \"\\n

Installing NPM Modules

\\n

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
  1. Launch the command line by hitting Shift-Escape. You can also go to View > Command Line if it's not visible.
  2. \\n
  3. Type npm install express, and wait for the npm install process to complete.
  4. \\n
  5. Create a new JavaScript file, and paste the following code:
  6. \\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 \\\"The button in the menu bar.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"installing_python_packages\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Installing Python Packages\",\n \"contents\": \"\\n

Installing Python Packages

\\n

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:

\\n
>>> help('modules')
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"setting_up_redis\",\n \"mtime\": 1416998221000,\n \"pageTitle\": \"Redis\",\n \"contents\": \"\\n
\\n

Redis

\\n

Running

\\n

Cloud9 workspaces come with redis pre-installed.

\\n

Start the server:

\\n
sudo service redis-server start
\\n

Connect with the client:

\\n
./redis-cli
\\n

Drivers

\\n

See http://redis.io/clients for drivers.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"setting_up_sqlite3\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"SQLite\",\n \"contents\": \"\\n
\\n

SQLite

\\n

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

\\\"Screenshot

\\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.

\\n

To exit sqlite, use the command: .exit.

\\n

Drivers

\\n

SQLite has drivers for all supported runtimes.

\\n

Following are the most commonly used drivers:

\\n

Node.JS apps

\\n

node-sqlite

\\n

Rails apps

\\n

In your Gemfile, include the line:

\\n
gem 'sqlite3'
\\n

and in configs/database.yml, make sure you use:

\\n
adapter: sqlite3\\ndatabase: db/development.db
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"running_a_rails_app\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Running a Rails App\",\n \"contents\": \"\\n
\\n

Running a Rails App

\\n

Cloud9 IDE also supports the ability to run a Rails application. The rails command is only available on the terminal.

\\n

To run a rails application:

\\n
    \\n
  1. Open the terminal and type gem install rails
  2. \\n
  3. When done, type rails new example -d mysql
  4. \\n
  5. Edit your database configuration in configs/database.yml
  6. \\n
  7. Type rails s -b $IP -p $PORT
  8. \\n
\\n

That's it! Your rails app will now be running.

\\n

Note:

http://<workspacename>-c9-<username>.c9.io should be running your application.\\n\\n
\\n

Do not try to access the project through the IP address and port number rails returns to you--it won't work!

\\n

Use MySQL in your rails app

\\n
    \\n
  1. Setup MySQl - note your DB connect parameters

    \\n
  2. \\n
  3. edit configs/database.yml

    \\n
  4. \\n
\\n
development:\\n  adapter: mysql2\\n  encoding: utf8\\n  database: c9\\n  username: <%=ENV['C9_USER']%>\\n  host: <%=ENV['IP']%>
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"installing_ruby_gems\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Installing Ruby Gems\",\n \"contents\": \"\\n

Installing Ruby Gems

\\n

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 },\n {\n \"filename\": \"running_wordpress_on_cloud9\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Running WordPress on Cloud9\",\n \"contents\": \"\\n
\\n

Running WordPress on Cloud9

\\n

WordPress is web software you can use to create websites or blogs.\\nYou can develop and host WordPress websites entirely on Cloud9 IDE

\\n

Creating a wordpress workspace

\\n

Create a WordPress workspace from the WordPress template on your Cloud9 dashboard

\\n

Note:

We will download, extract and configure WordPress for you.\\n\\n
\\n

In order to run WordPress, you need a database to host your posts, articles, etc.

\\n

You can use MySQL with our utility script mysql-ctl as explained in MySQL Setup

\\n

Running the website

\\n

To start MySQL server and create the required database, type in the terminal:

\\n
mysql-ctl start
\\n

Open index.php in your workspace root and click the Run button

\\n

You can check the generated config for you In wp-config.php (you don't need to change anything there)

\\n
define('DB_NAME', 'c9');\\ndefine('DB_USER', getenv('C9_USER'));\\ndefine('DB_PASSWORD', '');\\ndefine('DB_HOST', getenv('IP'));\\ndefine('WP_SITEURL', 'http://' . getenv('C9_PROJECT') . '.' . getenv('C9_USER') . '.c9.io');
\\n\\n
\\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 \\\"Icon 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

\\\"Run

\\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:
\\\"Console

\\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 \\\"Run 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:
\\\"The

\\n

This toolbar, however, grants you the following capabilities:

\\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
Toolbar IconDebugging FunctionDescription
\\\"DebuggingDebugging NavigationThis 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.
\\\"IconCallstackThis 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:
\\\"Callstack
\\\"IconInteractive ModeLets 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\\\"Interactive
\\\"IconVariable InspectionThis shows all the related variables (including functions) that are present in the current context:\\n\\\"Variable
\\\"IconBreakpoint ListAt any point during your coding or debugging session, you can click on the gutter to apply a breakpoint: \\\"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

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.
\\\"Live

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"writing_a_python_app\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Writing a Python App\",\n \"contents\": \"\\n

Writing a Python App

\\n

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 \\\"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

\\\"Create

\\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:

\\n
wget https://go.googlecode.com/files/go1.1.1.linux-amd64.tar.gz
\\n

Note:

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):

\\n
vim ~/.bashrc
\\n

Add the following lines to your .bashrc file:

\\n
# setup go configuration \\nexport GOROOT=$HOME/go \\nexport PATH=$PATH:$GOROOT/bin \\n\\n# setup workspace t\\nexport GOPATH=$HOME/562166 \\nexport PATH=$PATH:$GOPATH/bin
\\n

Update the GOPATH line above to use the workspace directory you noted earlier \\n(so don't use $HOME/562166).

\\n

After you save your .bashrc file, load the new settings:

\\n
source ~/.bashrc
\\n

That's it! You should be good to Go (pun intended).

\\n

Note:

Thanks to Scotty Moon for writing an article about Go on Cloud9 IDE\\nand letting us use it for documentation!
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"terminal_monitor\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"The Terminal Monitor\",\n \"contents\": \"\\n

The Terminal Monitor

\\n

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

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"writing_a_ruby_app\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Writing a Ruby App\",\n \"contents\": \"\\n
\\n

Writing a Ruby App

\\n

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 \\\"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

To use rvm, open the terminal and type:

\\n
# to switch to version 1.8.7\\nrvm use 1.8\\nrvm use 1.8.7 \\n\\n# to switch to version 1.9.3\\nrvm use 1.9\\nrvm use 1.9.3
\\n

However, if you like, you can install the "real" rvm by executing the following command in the terminal:

\\n
curl -L https://get.rvm.io | bash -s stable
\\n

To grab the latest rvm AND the latest Ruby version, type:

\\n
curl -L https://get.rvm.io | bash -s stable --ruby
\\n\\n
\\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
  1. Hosted
  2. \\n
  3. FTP
  4. \\n
  5. SSH
  6. \\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

\\\"New

\\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

\\\"Options

\\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.
  • \\n
  • FTP allows you to upload your files directly to an FTP server that you have access to
  • \\n
  • 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

\\\"New

\\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

\\\"Options

\\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:

\\n

\\\"Options

\\n

Paste the following GitHub URL in the textbox labeled Source URL: https://github.com/mattpardee/geekdots

\\n

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

\\\"Delete

\\n

Clicking on the Delete button prompts the IDE to ask for confirmation:
\\\"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 \\\"Project 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):
\\\"New

\\n

In the pop-up window that appears, select FTP for the project type:

\\n

\\\"FTP

\\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

\\\"New

\\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

\\\"Demonstrating

\\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:

\\n
var http = require('http');\\nhttp.createServer(function (req, res) {\\n    res.writeHead(200, {'Content-Type': 'text/plain'});\\n    res.end('Hello World\\\\n');\\n}).listen(process.env.PORT, process.env.IP);
\\n

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 \\\"The button in the menu bar, the console will print out the following message:
\\\"Console

\\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:
\\\"Node.js.

\\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.

\\n

To use nvm, open the terminal and type:

\\n
# to switch to version 0.6.21\\nnvm use v0.67 \\n\\n# to switch to the latest 0.8.x\\nnvm use v0.8
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"writing_a_php_app\",\n \"mtime\": 1412172002000,\n \"pageTitle\": \"Writing a PHP App\",\n \"contents\": \"\\n
\\n

Writing a PHP App

\\n

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:

\\n
<html>\\n  <head>\\n   <title>PHP Test</title>\\n  </head>\\n  <body>\\n   <?php echo '<p>Hello World</p>'; ?> \\n  </body>\\n</html>
\\n

Next, open the Run & Debug panel, at the left of the IDE. From the Runtime dropdown, select Apache+PHP. Then, click on the \\\"The button in the top menu bar.

\\n

The console should now spit out a message about how your Apache server is running, something similar to this:

\\n
Running Apache Process\\nTip: you can access long running processes, like a server, at 'http://php_hello.gjtorikian.c9.io'.
\\n

Clicking on that link gets you to your PHP page. For a more in-depth workflow, see the article on running WordPress entirely on Cloud9.

\\n

Modifying php.ini

\\n

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

\\\"Add-on

\\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

\\\"Bitbucket

\\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 \\\"Project to add a new project:

\\n

\\\"New

\\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

\\\"New

\\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: \\\"Start

\\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 \\\"Project, 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

\\\"Clone

\\n

You can find an examples of a Bitbucket URL on any of their repo description pages:

\\n

\\\"Bitbucket

\\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

\\\"Bitbucket

\\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
  1. Node.js installed on the server. This version must be between Node.js version 0.6.16 and the latest 0.8.x.
  2. \\n
  3. 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.
  4. \\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 \\\"Project 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):
\\\"New

\\n

In the pop-up window that appears, select SSH for the project type:
\\\"SSH

\\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\\\"New

\\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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"ssh_workspaces\",\n \"mtime\": 1416998221000,\n \"pageTitle\": \"SSH Workspaces\",\n \"contents\": \"\\n
\\n

SSH Workspaces

\\n

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

\\\"Add-on

\\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

\\\"GitHub

\\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 \\\"Project to add a new project:

\\n

\\\"New

\\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

\\\"New

\\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: \\\"Start

\\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 \\\"Project, 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

\\\"Clone

\\n

You can find an examples of a GitHub URL on any of their repo description pages:

\\n

\\\"GitHub

\\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

\\\"GitHub

\\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/.

\\n

GitLab.com offers services for on-premise GitLab installations \\nand free private git repositoring on GitLab Cloud \\nwith unlimited repo's and collaborators.

\\n

To use your on-premise GitLab installation or GitLab Cloud please see \\nthe instructions for cloning from a url.

\\n\\n
\\n
\\n \"\n }\n ],\n \"toc\": \"\\n \\n \",\n \"baseUrl\": \"https://docs.c9.io\",\n \"title\": \"Cloud9 User Documentation\"\n}" + "contents": "{\n \"files\": [\n {\n \"filename\": \"deploying_code\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Deploying Your Code\",\n \"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

\\\"The

\\n

We offer tight integration with the following environments:

\\n\\n

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:

\\n\\n

Warning:

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.
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"deploying_to_heroku\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Deploying to Heroku\",\n \"contents\": \"\\n

Deploying to Heroku

\\n

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

\\\"Showing

\\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

\\\"Dialog

\\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:

\\n
{\\n    \\\"name\\\": \\\"cloud9-heroku-example\\\",\\n    \\\"version\\\": \\\"0.0.1\\\"\\n}
\\n

After you have a package.json file, you might see this dialog:

\\n

\\\"Dialog

\\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

\\\"Console

\\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\": 1416491265000,\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:
\\\"Windows

\\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:
\\\"Windows

\\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
  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 about your app.

    \\n
  2. \\n
  3. 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
  4. \\n
  5. 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
  6. \\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\\\"Windows

\\n

For more information on configuring your app on the Windows Azure website, see Deploying a Windows Azure App from Cloud9.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"deploying_via_cli\",\n \"mtime\": 1416491265000,\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.

\\n

Windows Azure Web Sites

\\n

Free and Premium Plans

\\n

In the Console or a Terminal, type the \\nfollowing:

\\n
npm install azure
\\n

Now, you can use the azure command from the Console/Terminal. For more \\ninformation, read the official azure documentation.

\\n

Premium Plans

\\n

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):

\\n
echo \\\"machine code.google.com login EMAIL password PASSWORD\\\" >> ~/.netrc\\ngit remote add appengine REPO
\\n

Note:

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
\\n

NodeJitsu

\\n

Free and Premium Plans

\\n

In the the Console or a Terminal, type:

\\n
npm install jitsu@0.7.x -g\\nmkdir node_modules\\nmv ../lib/node_modules/jitsu node_modules
\\n

Now, you can run jitsu from the command line. For more information, see \\nthe official jitsu documentation.

\\n

Premium Plans

\\n
npm install jitsu@0.7.x -g
\\n

You can now run jitsu from both the Console and the Terminal.

\\n

Modulus

\\n

In the the Console or a Terminal, type:

\\n
npm install modulus -g
\\n

Now, you can run modulus from the command line. For more information, see \\nthe official modulus documentation.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"faq_general\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"FAQ: General\",\n \"contents\": \"\\n
\\n

FAQ: General

\\n

Can I use FTP workspaces on Cloud9?

\\n

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.

\\n

How do I deploy to Heroku/Openshift/Azure/...?

\\n

See Deploying via CLI.

\\n

Can I connect to SMTP servers (port 25)?

\\n

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 -d 1 -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

I can't preview my running app.

\\n

Try using port 8080 instead, which often solves this case.

\\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\\n
\\n
\\n \"\n },\n {\n \"filename\": \"faq_php\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"FAQ: PHP\",\n \"contents\": \"\\n
\\n

FAQ: PHP

\\n

where are the Apache logs?

\\n

By default the logs are in ~/lib/apache2/log

\\n

Is mail() supported?

\\n

No, this is currently not supported; see FAQ: General about SMTP access.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"faq_python\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"FAQ: Python\",\n \"contents\": \"\\n
\\n

FAQ: Python

\\n

Why does easy_install report a permission_denied error?

\\n

Please use sudo easy_install instead.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"faq_ssh\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"FAQ: SSH workspaces\",\n \"contents\": \"\\n
\\n

FAQ: SSH workspaces

\\n

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"

\\n

Try executing the following command:

\\n
yum install ncurses-devel 
\\n

or

\\n
yum install glibc-static 
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"autocompletion\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Code Autocompletion\",\n \"contents\": \"\\n

Code Autocompletion

\\n

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

\\\"Autocompletion

\\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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"collaboration\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Collaboration\",\n \"contents\": \"\\n
\\n

Collaboration

\\n

Note:

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

\\\"The

\\n

If you are the owner of a project, you can click on anyone's username to grant (or revoke) write access:

\\n

\\\"Granting

\\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\": \"colorpicker\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Color Picker\",\n \"contents\": \"\\n

Color Picker

\\n

Note:

this feature is deprecated\\n\\n
\\n
\\n\\n
\\n\\n

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: \\\"Color

\\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:
\\\"Color

\\n

To set the value, just click anywhere outside of the color picker.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"git_blame\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Git Blame\",\n \"contents\": \"\\n

Git Blame

\\n

Note:

this feature is deprecated\\n\\n
\\n
\\n\\n
\\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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"custom_runners\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Custom Runners\",\n \"contents\": \"\\n
\\n

Custom Runners

\\n

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.

\\n
{\\n    \\\"cmd\\\": [\\\"go\\\", \\\"run\\\", \\\"$file\\\", \\\"$args\\\"],\\n    \\\"selector\\\": \\\"source.go\\\",\\n    \\\"info\\\": \\\"Your code is running :)\\\"\\n}
\\n

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.

    \\n
  • \\n
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"gotofile_and_definition\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Using Goto File and Goto Definition\",\n \"contents\": \"\\n

Using Goto File and Goto Definition

\\n

Note:

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

\\\"Goto

\\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

\\\"Goto

\\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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"language_analysis\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Language Analysis\",\n \"contents\": \"\\n
\\n

Language Analysis

\\n

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 (\\\"Little): these are non-critical, non-dangerous updates about your code
  • \\n
  • Warnings (\\\"Warning): these are potentially incorrect pieces of code
  • \\n
  • Errors (\\\"Error): 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:
\\\"fs

\\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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"multiple_cursors\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Multiple Cursors\",\n \"contents\": \"\\n

Multiple Cursors

\\n

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

\\\"Showing

\\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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"revisions\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Revisions\",\n \"contents\": \"\\n

Revisions

\\n

Note:

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: \\\"Revisions

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"searching_in_files\",\n \"mtime\": 1416491265000,\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:
\\\"Search

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"supported_languages\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Supported Languages\",\n \"contents\": \"\\n
\\n

Supported Languages

\\n

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.

\\n

See Syntax Highlighting & Themes for more \\ninfo.

\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n

Running apps

\\n

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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"syntax_highlighting_themes\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Syntax Higlighting and Themes\",\n \"contents\": \"\\n

Syntax Higlighting and Themes

\\n
\\n\\n

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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"uploading_downloading\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Uploading and Downloading Workspace Files\",\n \"contents\": \"\\n

Uploading and Downloading Workspace Files

\\n

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

\\\"Uploading

\\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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"zen_mode\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Activating Zen Mode\",\n \"contents\": \"\\n

Activating Zen Mode

\\n

Note:

this feature is deprecated\\n\\n
\\n
\\n\\n
\\n\\n

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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_drupal\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Framework: Drupal\",\n \"contents\": \"\\n

Framework: Drupal

\\n

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

\\\"Drupal

\\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

\\\"Drupal

\\n

Now fill the form with the correct site information:

\\n

\\\"Drupal

\\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
\\n

\\\"Drupal

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_angularjs\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Framework AngularJS\",\n \"contents\": \"\\n

Framework AngularJS

\\n

AngularJS lets you write client-side web \\napplications as if you had a smarter browser.

\\n

Follow these steps to create an AngularJS application using the official project\\ntemplate:

\\n
    \\n
  1. Create a workspace and choose the PHP workspace type
  2. \\n
  3. Open a Terminal, or using the pre-existing one at the bottom
  4. \\n
  5. Run the following commands in the Terminal:
    rm -rf * .c9\\ngit clone https://github.com/angular/angular-seed.git .\\nnpm install\\nmv package.json package.json.bak\\njq '.scripts.start=\\\"http-server -a $IP -p $PORT\\\"' package.json.bak > package.json
    \\n
  6. \\n
  7. Click the Run Project button in the top menu of the IDE
  8. \\n
  9. Check the README.md for further steps
  10. \\n
\\n

Note:

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.
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_express\",\n \"mtime\": 1416496691000,\n \"pageTitle\": \"Framework: Express\",\n \"contents\": \"\\n
\\n

Framework: Express

\\n

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:

\\n
$ npm install -g express-generator\\n$ express -f .\\n$ npm install
\\n

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
  1. Click Run -> Run Configurations -> Manage ...
  2. \\n
  3. Click Add New Config
  4. \\n
  5. In the run panel fill in Express as name, bin/www as the command and Node 0.10.x as the runner.
  6. \\n
  7. 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.
  8. \\n
\\n

The finished run configuration should look something like this

\\n

\\\"Express

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_ghost\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Framework: Ghost\",\n \"contents\": \"\\n

Framework: Ghost

\\n

Ghost is a simple, powerful publishing platform that \\nallows you to share your story with the world.

\\n

Create a Ghost blog as follows:

\\n
    \\n
  1. Create a new workspace (Node.js or Custom for a clean workspace)
  2. \\n
  3. Open a Terminal, or use the pre-existing one at the bottom
  4. \\n
  5. Run the following commands in the Terminal:

    \\n
     $ curl -L https://ghost.org/zip/ghost-latest.zip -o ghost.zip\\n $ unzip -uo ghost.zip -d .\\n $ rm ghost.zip\\n $ npm install --production
    \\n
  6. \\n
  7. Adapt the config.js file to the Cloud9 environment. Change the following keys:

    \\n
     config: {\\n     development: {\\n         url: 'https://' + process.env.C9_HOSTNAME,\\n     },\\n     server: {\\n         host: process.env.IP,\\n         port: process.env.PORT\\n     }\\n }
    \\n
  8. \\n
  9. Run Ghost by typing npm start in the console or by opening index.js and\\nhitting the run button.

    \\n
  10. \\n
  11. 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
  12. \\n
\\n

Change the URL to /ghost and create your admin user to login to the Ghost admin interface

\\n

Note:

These instructions are based on the official Ghost Installation Guide\\n
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_ionic\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Framework: Ionic\",\n \"contents\": \"\\n

Framework: Ionic

\\n

Ionic is an open source front-end framework for developing hybrid mobile apps with HTML5.

\\n

Create a Ionic app as follows:

\\n
    \\n
  1. Create a new workspace (Node.js or Custom for a clean workspace)
  2. \\n
  3. Open a Terminal, or use the pre-existing one at the bottom
  4. \\n
  5. Run the following commands in the Terminal:

    \\n
     $ npm install -g cordova ionic\\n $ ionic start myApp sidemenu\\n $ cd myApp\\n $ ionic serve $PORT
    \\n
  6. \\n
  7. 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
  8. \\n
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_jekyll\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Framework: Jekyll\",\n \"contents\": \"\\n

Framework: Jekyll

\\n

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\": \"frameworks_joomla\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Joomla\",\n \"contents\": \"\\n
\\n

Joomla

\\n

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
\\n

Download Joomla

\\n
    \\n
  1. Create a Cloud9 workspace of type "Custom" or "PHP"
  2. \\n
  3. Download and Unzip Joomla from the Terminal. You can find the latest version on the Joomla website

    \\n
     wget http://joomlacode.org/gf/download/frsrelease/19665/160049/Joomla_3.3.3-Stable-Full_Package.zip\\n unzip Joomla*.zip\\n rm Joomla*.zip
    \\n
  4. \\n
\\n

Start the database

\\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
  1. Pop out the Preview by clicking the Popout icon \\\"Preview (or copy & load the URL in a browser tab)
  2. \\n
  3. Change the URL from https:// to http:// and load it
  4. \\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

\\\"Joomla

\\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

\\\"Joomla

\\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!

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_koa\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Framework: Koa\",\n \"contents\": \"\\n

Framework: Koa

\\n

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.

\\n

(Credits go to Tom at http://kyorcode.blogspot.nl/2014/08/running-koajs-in-cloud9.html)

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_laravel\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Framework: Laravel\",\n \"contents\": \"\\n

Framework: Laravel

\\n

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:

\\n
rm README.md php.ini hello-world.php\\ncomposer create-project laravel/laravel ./laravel --prefer-dist\\nshopt -s dotglob\\nmv laravel/* ./\\nrm -rf laravel
\\n

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.

\\n

\\\"Run

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_meteor\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Framework: Meteor\",\n \"contents\": \"\\n

Framework: Meteor

\\n

Meteor is an open-source platform for building web apps.

\\n

Create a Meteor app as follows:

\\n
    \\n
  1. Create a new workspace (Node.js or Custom for a clean workspace)
  2. \\n
  3. Open a Terminal, or using the pre-existing one at the bottom
  4. \\n
  5. Run the following commands in the Terminal:

    \\n
     curl https://install.meteor.com/ | sh\\n meteor create ./my_cool_app\\n cd my_cool_app/\\n meteor --port $IP:$PORT
    \\n
  6. \\n
  7. 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
  8. \\n
\\n

Note:

Alternatively, for the last step, click on the link that's displayed in the terminal, and change it in the resulting Preview to http://127.0.0.1:8080.
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"frameworks_symfony2\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Framework: Symfony2 \",\n \"contents\": \"\\n
\\n

Framework: Symfony2

\\n

Symfony is one of the leading PHP Webframeworks. It is Open-Source and built on top of the Symfony Components.

\\n

Getting started

\\n
    \\n
  1. Create a Cloud9 workspace of the type "Custom" or "PHP"
  2. \\n
  3. Install the Intl extension for PHP that is required in most of the Symfony2 projects

    \\n
     sudo apt-get install php5-intl
    \\n
  4. \\n
  5. Set a valid PHP timezone

    \\n
     echo 'date.timezone = UTC' | sudo tee --append /etc/php5/apache2/php.ini
    \\n
  6. \\n
  7. Starting MySQL-Server

    \\n
     sudo mysql-ctl install\\n sudo mysql-ctl start
    \\n
  8. \\n
\\n

Create a Symfony-Project

\\n

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.

\\n
    rm README.md php.ini hello-world.php\\n    composer create-project symfony/framework-standard-edition symfony/ \\\"2.5.*\\\"\\n    mv symfony/{*,.*} ./ \\n    rm -rf symfony
\\n

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.0 403 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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"create_a_workspace\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Create a Workspace\",\n \"contents\": \"\\n

Create a Workspace

\\n

Cloud9 supports three types of workspaces:

\\n
    \\n
  1. Hosted
  2. \\n
  3. FTP
  4. \\n
  5. SSH
  6. \\n
\\n

"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

\\\"New

\\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

\\\"Options

\\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

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

\\\"Options

\\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:

\\n

\\\"New

\\n

Now, just click Start Editing to get started!

\\n

Next up, read how to run an application and set up a database.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"run_an_application\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Run an application\",\n \"contents\": \"\\n
\\n

Run an application

\\n

On Hosted and SSH workspaces, Cloud9 provides two ways to run your application:

\\n
    \\n
  1. Using the Run panel with built-in Runners for many languages
  2. \\n
  3. From a Terminal
  4. \\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

\\\"Run

\\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

\\\"Run

\\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
  • \\n
  • Environment: Set environment variables
  • \\n
  • \\n
\\n

Tip:

If you can't find the Runner you need from the default set, you can create your own custom Runner.\\n\\n
\\n

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
  1. 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.
  2. \\n
  3. 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.
  4. \\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\": 1416491265000,\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 note of 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:

\\n
$ mysql-ctl cli\\nWelcome to the MySQL monitor.  Commands end with ; or \\\\g.\\nYour MySQL connection id is 24\\nServer version: 5.5.37-0ubuntu0.14.04.1 (Ubuntu)\\n\\nCopyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.\\n\\nOracle is a registered trademark of Oracle Corporation and/or its\\naffiliates. Other names may be trademarks of their respective\\nowners.\\n\\nType 'help;' or '\\\\h' for help. Type '\\\\c' to clear the current input statement.\\n\\nmysql>  show databases;\\n+--------------------+\\n| Database           |\\n+--------------------+\\n| information_schema |\\n| c9                 |\\n| mysql              |\\n| performance_schema |\\n+--------------------+\\n4 rows in set (0.15 sec)
\\n

MongoDB

\\n

From the Terminal, run the following command:

\\n
$ mongod --bind_ip=$IP --nojournal
\\n

The output will include:

\\n
...\\nwaiting for connections on port 27017
\\n

Now you can open the mongo shell in a new Terminal, running following command:

\\n
$ mongo
\\n

To stop the MongoDB instance press Control+C in the Terminal where mongod is running.\\nNow have a look at the currently used database:

\\n
$ mongo\\nmongo> db\\ntest
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"share_a_workspace\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Share a workspace\",\n \"contents\": \"\\n
\\n

Share a workspace

\\n

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

\\\"Share

\\n

Here's what you see when you pull up the Share dialog:

\\n

\\\"Share

\\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

\\\"Collaboration

\\n

In order to share your entire development environment, do one of the following:

\\n
    \\n
  1. Make the URL publicly available to everyone: check the "Public" checkbox for the "Editor" in the "Links to Share" section.
  2. \\n
  3. Choose to share only with specific people: invite them from the "Invite people" section.
  4. \\n
  5. Grant/revoke access rights in the "Who has access" section.
  6. \\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.
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"console\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"The Console\",\n \"contents\": \"\\n
\\n

The Console

\\n

Note:

this feature is deprecated\\n\\n
\\n

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:

\\n\\n

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:

\\n\\n

Output

\\n

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:
\\\"Screenshot

\\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: \\\"Running

\\n

If you hover over this message, you can opt to cancel the process by clicking on the button: \\\"Cancelling

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"dashboard\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"The Dashboard\",\n \"contents\": \"\\n

The Dashboard

\\n

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

\\\"An

\\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

\\\"A

\\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
  • \\n
\\n

Clicking on the \\\"Project next to MY PROJECTS lets you:

\\n
    \\n
  • Create a new project
  • \\n
  • Clone from URL
  • \\n
\\n

\\\"Creating

\\n

For more information on creating new workspaces, see this section of the documentation.

\\n

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: \\\"Refresh

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"ide_overview\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"IDE Overview\",\n \"contents\": \"\\n
\\n

IDE Overview

\\n

Note:

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

\\\"IDE

\\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:
\\\"Hiding

\\n

The Top Menu Bar

\\n

\\\"A

\\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.

\\n

In the middle of the menu bar you'll find the debug button: \\\"The. This is used for running and debugging your code. For more information, see the section on "Running and Debugging Your Code"..

\\n

\\n

The preview button \\\"The 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: \\\"Autosave. 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 \\\"Tab 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.

\\n

At the lower-right corner, you can find the status bar.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"ide_preferences\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"IDE Preferences\",\n \"contents\": \"\\n
\\n

IDE Preferences

\\n

Note:

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 \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
Preference NameDescription
Enable UI AnimationsEnables or disables fluid animations for various UI elements, such as the Project Bar
Animate ScrollingEnables or disables fluid animations when scrolling through code (such as for goto line)
Enable Auto-SaveIf enabled, automatically saves your files on every change
On Save, Strip WhitespaceWhen saving a file, you can remove all extraneous whitespace from your code lines
Reveal Active File in Project TreeEnabling this jumps the project tree to the active file whenever a tab changes to a different file
Warn Before ExitingPrevents accidental data loss by showing a dialog asking if you really want to leave Cloud9 IDE when closing your browser
Node.js RuntimeDefines 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.
KeybindingsAllows you to choose which operating system to use for keyboard shortcuts
\\n

Language Support

\\n

This section controls language analysis options:

\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n \\n \\n \\n \\n \\n \\n \\n
Preference NameDescription
Enable Hints and Warnings RulesPresents information about your code in the gutter
Highlight Variable InstancesHighlights variable instances in your code
Mark Undeclared VariablesProvides warnings if a variable is being used and has not been declared yet
Mark Unused Function ArgumentsProvides a strikethrough for arguments in a function that are not being used
Warning LevelSpecifies the minimum level of information severity you want provided in the gutter
\\n

Code Editor

\\n

This section controls language analysis options:

\\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
Preference NameDescription
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 SelectionWhen highlighting lines, this option will highlight all ending whitespace, until the end of the editor window
Highlight Active LinePresents a darker shade in the code editor to indicate which line you're currently on
Highlight Gutter LinePresents a darker shade in the gutter which line you're currently on
Show Invisible CharactersShows invisibles characters in the editor, like tabs and line breaks
Show Indent GuidesShows the indent guides in the editor, letting you see your code's nestings
Show GutterShows the gutter in the editor, which indicates line numbers, warnings, and errors
Highlight Selected WordIf you highlight a word, this highlights all matching words in the editor
Auto-hide Horizontal ScrollWhen 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 ModeWhen enabled, allows you to use vim keybindings in the IDE
Code FoldingWhen enabled, allows you to show or hide "blocks" of code
Fade Fold WidgetsWhen enabled, fades the folding widgets in the gutter
Font SizeChanges the font size of the code in the editor
Show Print MarginShows (and defines) the number of characters possible in line, before it wraps
Soft TabsIndicates how many spaces a single tab represents
Mouse Scroll SpeedDefines the speed of the mouse scrolls
Newline ModeSpecifies the newline mode for the IDE
\\n

Terminal

\\n

This section controls the behavior for the terminal:

\\n
\\n \\n \\n \\n \\n \\n \\n \\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n \\n \\n \\n
Preference NameDescription
ScrollbackSets the scrollback buffer for the terminal
Font FamilySets the font for the terminal
Font SizeSets the font size for the terminal
Blinking CursorSpecifies whether or not you want the cursor to blink
\\n

Code Tools

\\n

This section controls the various tools that are available in the IDE:

\\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n \\n \\n
Preference NameDescription
Enable Color PickerMakes the color picker available for use
Preserve Empty LinesWhen enabled, the editor keeps any new lines without text
Keep Array IndentionWhen enabled, tabs and newlines in arrays are preserved. For example, the follow array would remain as-is with this option:\\n
\\n        var o = [{\\n            a: b\\n        }, {\\n            c: d\\n        }];\\n        
\\n
JSLint Strict WhitespaceIf selected, all brackets are preceded by a space. For example, if(x){ becomes if (x) {, and function(arg){ becomes function (arg) {
BracesThese options control how braces are handled in the IDE:\\n
    \\n
  • Braces with control statement: braces are left "in-line" alongside the code statements. For example, code is formatted like this:\\n
    \\n    if (true) {\\n        var x = 3;\\n    } else {\\n        var x = 5;\\n    }\\n    
    \\n
  • \\n
  • Braces on own line: braces are always placed on their own line. For example, code is formatted like this:\\n
    \\n    if (true)\\n    {\\n        var x = 3;\\n    } else\\n    {\\n        var x = 5;\\n    }\\n    
    \\n
  • \\n
  • End braces on own line: only the ending braces have their own line. For example, code is formatted like this:\\n
    \\n    if (true) {\\n        var x = 3;\\n    }\\n    else {\\n        var x = 5;\\n    }\\n    
    \\n
  • \\n
\\n
\\n
\\n
\\n \"\n },\n {\n \"filename\": \"keybindings\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Commands and Keybindings\",\n \"contents\": \"\\n

Commands and Keybindings

\\n

Note:

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!

\\n
\\n \\n
\\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
Command NameKeybinding
Abortclicommand˄-C
AddCursorAbove˄-⌥-Up
AddCursorAboveSkipCurrent˄-⌥-⇧-Up
AddCursorBelow˄-⌥-Down
AddCursorBelowSkipCurrent˄-⌥-⇧-Down
Backspace˄-⌫
Beautify⌘-⇧-B
Clearcut
Closeallbutme⌥-˄-W
Closealltabs⌥-⇧-W
Closetab⌥-W
Complete˄-Space
Copy⌘-C
Copylinesdown⌘-⌥-Down
Copylinesup⌘-⌥-Up
Cut⌘-X
DelDelete
DuplicateSelection⌘-⇧-D
Escapeconsole
EvalInteractive⌘-Return
Find⌘-F
Findnext⌘-G
Findprevious⌘-⇧-G
Fold⌘-⌥-L
Foldall⌘-⌥-0
GolinedownDown
GolineupUp
Gotoend⌘-End
Gotofile⌘-E
GotoleftLeft
Gotoline⌘-L
Gotolineend⌘-Right
Gotolinestart⌘-Left
GotopagedownPageDown
GotorightRight
Gotostart⌘-Home
Gototableft⌘-[
Gototabright⌘-]
Gotowordleft⌥-Left
Gotowordright⌥-Right
IndentTab
Jumptomatching˄-⇧-P
Largerfont˄-⇧-.
Movelinesdown⌥-Down
Movelinesup⌥-Up
Movetableft⌘-⌥-[
Movetabright⌘-⌥-]
Newfile⌥-⇧-N
Newfiletemplate⌥-˄-N
Newfolder⌥-˄-⇧-N
Nexttab⌥-Tab
Openfilepanel⇧-⌘-U
Opensettingspanel⌘-,
Opentreepanel⌘-U
Outdent⇧-Tab
Outline⌘-⇧-E
Paste⌘-V
Previoustab⌥-⇧-Tab
Quicksave⌘-S
Quickwatch⌥-Q
Redo⌘-⇧-Z
Removeline⌘-D
Removetolineend˄-K
Removetolinestart⌘-⌫
Removewordleft⌥-⌫
Removewordright⌥-Delete
RenameVar⌥-⌘-R
Replace⌥-⌘-F
Replaymacro⌘-˄-R
ResumeF8
Revealtab⇧-⌘-L
Reverttosaved˄-⇧-Q
Revisionpanel⌘-B
RunF5
Saveas⌘-⇧-S
Savetabsession⇧-˄-S
Searchinfiles⇧-⌘-F
SelectMoreAfter˄-⌥-Right
SelectMoreBefore˄-⌥-Left
SelectNextAfter˄-⌥-⇧-Right
SelectNextBefore˄-⌥-⇧-Left
Selectall⌘-A
Selectdown⇧-Down
Selectleft⇧-Left
Selectright⇧-Right
Selecttoend⌘-⇧-Down
Selecttolineend⌘-⇧-Right
Selecttolinestart⌘-⇧-Left
Selecttostart⌘-⇧-Up
Selectup⇧-Up
Selectwordleft⌥-⇧-Left
Selectwordright⌥-⇧-Right
Smallerfont˄-⇧-,
SplitIntoLines˄-⇧-L
StepintoF11
Stepout⇧-F11
StepoverF10
Stop⇧-F5
Switchconsole⇧-⎋
Tab0⌘-0
Tab1⌘-1
Tab2⌘-2
Tab3⌘-3
Tab4⌘-4
Tab5⌘-5
Tab6⌘-6
Tab7⌘-7
Tab8⌘-8
Tab9⌘-9
ToggleTabs˄-M
Togglecomment⌘-/
Toggleconsole˄-⎋
Togglerecording⌘-⇧-R
Tolowercase˄-⇧-U
Touppercase˄-U
Transposeletters˄-T
Undo⌘-Z
Unfold⌘-⌥-⇧-L
Unfoldall⌘-⌥-⇧-0
Zen⌥-Z
Zenslow⇧-⌥-Z
\\n
\\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
Command NameKeybinding
AbortclicommandCtrl-C
AddCursorAboveCtrl-Alt-Up
AddCursorAboveSkipCurrentCtrl-Alt-Shift-Up
AddCursorBelowCtrl-Alt-Down
AddCursorBelowSkipCurrentCtrl-Alt-Shift-Down
BackspaceCommand-Backspace
BeautifyShift-Ctrl-B
ClearcutESC
CloseallbutmeCtrl-Alt-W
ClosealltabsCtrl-Shift-W
ClosetabCtrl-W
CompleteCtrl-Space
CopyCtrl-C
CopylinesdownAlt-Shift-Down
CopylinesupAlt-Shift-Up
CutCtrl-X
DelDelete
DuplicateSelectionCtrl-Shift-D
EscapeconsoleEsc
EvalInteractiveCtrl-Return
FindCtrl-F
FindnextCtrl-K
FindpreviousCtrl-Shift-K
FoldAlt-L
FoldallAlt-0
GolinedownDown
GolineupUp
GotoendCtrl-End
GotofileCtrl-E
GotoleftLeft
GotolineCtrl-G
GotolineendAlt-Right
GotolinestartAlt-Left
GotopagedownPageDown
GotorightRight
GotostartCtrl-Home
GototableftCtrl-[
GototabrightCtrl-]
GotowordleftCtrl-Left
GotowordrightCtrl-Right
IndentTab
JumptomatchingCtrl-P
LargerfontCtrl-Shift-.
MovelinesdownAlt-Down
MovelinesupAlt-Up
MovetableftCtrl-Alt[
MovetabrightCtrl-Alt-]
NewfileCtrl-N
NewfiletemplateCtrl-Alt-N
NewfolderCtrl-N
NexttabCtrl-Tab
OpenfilepanelShift-Ctrl-U
OpensettingspanelCtrl-,
OpentreepanelCtrl-U
OutdentShift-Tab
OutlineCtrl-Shift-E
PasteCtrl-V
PrevioustabCtrl-Shift-Tab
QuicksaveCtrl-S
QuickwatchAlt-Q
RedoCtrl-Shift-Z
RemovelineCtrl-D
RemovetolineendAlt-Delete
RemovetolinestartAlt-Backspace
RemovewordleftCtrl-Backspace
RemovewordrightCtrl-Delete
RenameVarCtrl-Alt-R
ReplaceAlt-Shift-F
ReplaymacroAlt-R
ResumeF8
RevealtabCtrl-Shift-L
ReverttosavedCtrl-Shift-Q
RevisionpanelCtrl-B
RunF5
SaveasCtrl-Shift-S
SavetabsessionShift-Ctrl-S
SearchinfilesCtrl-Shift-F
SelectMoreAfterCtrl-Alt-Right
SelectMoreBeforeCtrl-Alt-Left
SelectNextAfterCtrl-Alt-Shift-Right
SelectNextBeforeCtrl-Alt-Shift-Left
SelectallCtrl-A
SelectdownShift-Down
SelectleftShift-Left
SelectrightShift-Right
SelecttoendCtrl-Shift-End
SelecttolineendAlt-Shift-Right
SelecttolinestartAlt-Shift-Left
SelecttostartCtrl-Shift-Home
SelectupShift-Up
SelectwordleftCtrl-Shift-Left
SelectwordrightCtrl-Shift-Right
SmallerfontCtrl-Shift-,
SplitIntoLinesCtrl-Shift-L
StepintoF11
StepoutShift-F11
StepoverF10
StopShift-F5
SwitchconsoleShift-Esc
Tab0Ctrl-0
Tab1Ctrl-1
Tab2Ctrl-2
Tab3Ctrl-3
Tab4Ctrl-4
Tab5Ctrl-5
Tab6Ctrl-6
Tab7Ctrl-7
Tab8Ctrl-8
Tab9Ctrl-9
ToggleTabsCtrl-M
TogglecommentCtrl-/
ToggleconsoleF6
TogglerecordingAlt-Shift-R
TolowercaseCtrl-Shift-U
TouppercaseCtrl-U
TransposelettersCtrl-T
UndoCtrl-Z
UnfoldAlt-Shift-L
UnfoldallAlt-Shift-0
ZenAlt-Z
ZenslowShift-Alt-Z
\\n
\\n
\\n
\\n
\\n
\\n \"\n },\n {\n \"filename\": \"project_bar\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"The Project Bar\",\n \"contents\": \"\\n

The Project Bar

\\n

Note:

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: \\\"The

\\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.
  • \\n
  • Run & Debug lets you run and debug your code live, in the browser. For more information, see the section on "Running and Debugging Your Code".
  • \\n
  • Deploy allows you to deploy to a variety of services. For more information, see the section on "Deploying Your Code".
  • \\n
  • Preferences lets you change the behavior of the editor. The Preferences documentation is provided on its own page.
  • \\n
\\n

Clicking on any button expands its menu. Clicking on an expanded menu causes it to collapse, which gives you more room in the IDE to work with.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"status_bar\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Status Bar\",\n \"contents\": \"\\n

Status Bar

\\n

Note:

this feature is deprecated\\n\\n
\\n

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: \\\"The. 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 \\n \\n \\n \\n \\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
Preference NameDescription
Show InvisiblesShows invisibles characters in the editor, like tabs and line breaks
Wraps LinesWraps lines according to the line margin defined, or your browser's window. Otherwise, lines run off the current viewport.
Code FoldingWhen enabled, allows you to show or hide "blocks" of code
Full Line SelectionWhen highlighting lines, this option will highlight all ending whitespace, until the end of the editor window
Highlight Active LinePresents a darker shade in the code editor to indicate which line you're currently on
Show Indent GuidesShows the indent guides in the editor, letting you see your code's nestings
Show GutterShows the gutter in the editor, which indicates line numbers, warnings, and errors
Highlight Selected WordIf 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 Scrollbarhen 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 SizeChanges the font size of the code in the editor
Show Print MarginShows (and defines) the number of characters possible in line, before it wraps
Soft TabsIndicates how many spaces a single tab represents
Mouse Scroll SpeedDefines the speed of the mouse scrolls
\\n
\\n
\\n
\\n \"\n },\n {\n \"filename\": \"terminal\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Terminal\",\n \"contents\": \"\\n

Terminal

\\n

Note:

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
  • \\n
\\n

\\\"Screenshot

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"tab_functions\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Tab Functions\",\n \"contents\": \"\\n
\\n

Tab Functions

\\n

Note:

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

\\\"The

\\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:
\\\"The

\\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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"the_editor\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"The Editor\",\n \"contents\": \"\\n

The Editor

\\n

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:

\\n
    \\n
  • Undo and Redo support
  • \\n
  • Cut, Copy, and Paste functionality
  • \\n
  • Line manipulation, including:
      \\n
    • Indenting and outdenting
    • \\n
    • Moving and copying lines up or down
    • \\n
    • Removing lines from any point
    • \\n
    • Splitting lines
    • \\n
    \\n
  • \\n
  • Highlighting and commenting blocks of code
  • \\n
  • Removing words to the right or the left
  • \\n
  • Transposing letters
  • \\n
  • Code folding (including the entire file)
  • \\n
  • Converting cases
  • \\n
  • Multiple cursors
  • \\n
  • Autocompletion
  • \\n
  • Code analysis and refactoring
  • \\n
  • Search in files with regular expressions
  • \\n
  • Intelligent selections, including:
      \\n
    • Selecting to word right or left
    • \\n
    • Selecting to line end or start
    • \\n
    • Selecting to document end or start
    • \\n
    \\n
  • \\n
  • Vim and Emacs keybindings
  • \\n
  • Line wrapping, to a defined column or the width of the browser window
  • \\n
  • Support for a command line
  • \\n
  • Support for spaces and real tabs
  • \\n
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"index\",\n \"mtime\": 1416491265000,\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:

\\n\\n

Getting More Help

\\n

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:

\\n\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"setting_up_hosted_mysql\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"MySQL\",\n \"contents\": \"\\n
\\n

MySQL

\\n

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
  • \\n
  • Cross-platform support
  • \\n
  • Stored procedures
  • \\n
  • Triggers
  • \\n
  • Cursors
  • \\n
  • Updatable Views
  • \\n
  • Information schema
  • \\n
  • Many more
  • \\n
\\n

Using MySQL with Cloud9

\\n

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
  1. Register with Xeround
  2. \\n
  3. Log in to your controlpanel
  4. \\n
  5. Choose 'create new'
  6. \\n
  7. Choose a datacenter
  8. \\n
  9. Enter your Database name, Username and Password and create
  10. \\n
  11. Select your newly created instance and click the 'External DNS Hostname' link provided to log into PHPMyAdmin
  12. \\n
  13. Create and import/setup your database
  14. \\n
\\n

Cloud9

\\n
    \\n
  1. Log into your account
  2. \\n
  3. Create a new project (or use an existing one)
  4. \\n
  5. 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         ?>
    \\n
  6. \\n
  7. Save the file
  8. \\n
  9. Run the file
  10. \\n
\\n

Source

\\n

Courtesy of Roger Qui of Polycadamy. This guide is elaborately explained in a video tutorial

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"setting_up_mongodb\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"MongoDB\",\n \"contents\": \"\\n
\\n

MongoDB

\\n

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.

\\n
$ mkdir data\\n$ echo 'mongod --bind_ip=$IP --dbpath=data --nojournal --rest \\\"$@\\\"' > mongod\\n$ chmod a+x mongod
\\n

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:

\\n

Node.JS apps

\\n

Mongoose
\\nNode-Mongodb-Native

\\n

Shell Access

\\n

To access a shell prompt for the above MongoDB run the following.

\\n
$ mongo
\\n

Check out docs.mongodb.org for details on how to use the shell

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"setting_up_mysql\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"MySQL\",\n \"contents\": \"\\n
\\n

MySQL

\\n

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
  • \\n
  • Cross-platform support
  • \\n
  • Stored procedures
  • \\n
  • Triggers
  • \\n
  • Cursors
  • \\n
  • Updatable Views
  • \\n
  • Information schema
  • \\n
  • Many more
  • \\n
\\n

Using MySQL with Cloud9

\\n

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 \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
Option\\n Value\\n Comment\\n
Hostname$IPThe same local IP as the application you run on Cloud9
Port3306The default MySQL port number
User$C9_USERYour Cloud9 user name
Password-No password since you can only access the DB from within the workspace
Databasec9The database name
\\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
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"setting_up_phpmyadmin\",\n \"mtime\": 1416497235000,\n \"pageTitle\": \"PHPMyAdmin\",\n \"contents\": \"\\n
\\n

PHPMyAdmin

\\n

PHPMyAdmin provides an easy to use web interface to manage your MySQL database/s

\\n

PHPMyAdmin's most common features

\\n
    \\n
  • Import data from CSV and SQL
  • \\n
  • Export data to various formats: CSV, SQL, XML, PDF, Word, Excel, LaTeX and others
  • \\n
  • Creating PDF graphics of the database layout
  • \\n
  • Creating complex queries using Query-by-Example (QBE)
  • \\n
  • Searching globally in a database or a subset of it
  • \\n
  • Transforming stored data into any format using a set of predefined functions, like displaying BLOB-data as image or download-link
  • \\n
  • Live charts to monitor MySQL server activity like connections, processes, CPU/Memory usage, etc.
  • \\n
  • Many more
  • \\n
\\n

Using PHPMyAdmin with Cloud9

\\n

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.

\\n
# Install PHPMyAdmin\\n$ phpmyadmin-ctl install
\\n

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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"setting_up_redis\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Redis\",\n \"contents\": \"\\n
\\n

Redis

\\n

Running

\\n

Cloud9 workspaces come with redis pre-installed.

\\n

Start the server:

\\n
sudo service redis-server start
\\n

Connect with the client:

\\n
./redis-cli
\\n

Drivers

\\n

See http://redis.io/clients for drivers.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"setting_up_postgresql\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"PostgreSQL\",\n \"contents\": \"\\n
\\n

PostgreSQL

\\n

Installing PostgreSQL on a Cloud9 workspace

\\n

PostgreSQL comes preinstalled on every Cloud9 workspace, yay.

\\n

Start the PostgreSQL service

\\n
$ sudo service postgresql start
\\n

Set the "postgres" user password

\\n
$ sudo sudo -u postgres psql                                                                                  \\npsql (9.3.4, server 9.3.5)\\nType \\\"help\\\" for help.\\n\\npostgres=# \\\\password\\nEnter new password: \\nEnter it again: \\npostgres=# \\\\q
\\n

Connect to the service

\\n
$ sudo sudo -u postgres psql                                                                                  
\\n

Create a PostgreSQL database

\\n

Make sure you have logged into the PostgreSQL terminal and then you can just run:

\\n
$ sudo sudo -u postgres psql                                                                                  \\npostgres=# create database \\\"groceries\\\";
\\n

List all databases

\\n
$ sudo sudo -u postgres psql                                                                                  \\npostgres=# \\\\list
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"setting_up_sqlite3\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"SQLite\",\n \"contents\": \"\\n
\\n

SQLite

\\n

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

\\\"Screenshot

\\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.

\\n

To exit sqlite, use the command: .exit.

\\n

Drivers

\\n

SQLite has drivers for all supported runtimes.

\\n

Following are the most commonly used drivers:

\\n

Node.JS apps

\\n

node-sqlite

\\n

Rails apps

\\n

In your Gemfile, include the line:

\\n
gem 'sqlite3'
\\n

and in configs/database.yml, make sure you use:

\\n
adapter: sqlite3\\ndatabase: db/development.db
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"common_errors\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Common errors\",\n \"contents\": \"\\n
\\n

Common errors

\\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:

\\n
COMMAND PID   USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME\\napache2 699 ubuntu    4u  IPv6 83213152      0t0  TCP *:http-alt (LISTEN)
\\n

You now can kill that proccess. Make sure you replace PID with the ID of the process.

\\n
// Kill the process\\nkill -9 PID
\\n

For the console wizards:

\\n
kill -9 $(lsof -i:$PORT -t)
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"creating_coffeescript_app\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Create a CoffeeScript Project\",\n \"contents\": \"\\n

Create a CoffeeScript Project

\\n

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:

\\n
git clone git://github.com/fjakobs/cloud9-coffeescript-example.git
\\n

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:

\\n
http = require \\\"http\\\"\\n\\nmodule.exports = http.createServer((req, res) ->\\n    res.writeHead 200, 'Content-Type': 'text/plain'\\n    res.end 'Hello World\\\\n'
\\n

Next, run the server.js file and open the URL indicated in the console:

\\n

\\\"Messages

\\n

The result is:

\\n

\\\"The

\\n

To stop your application, go back to the editor and click on the \\\"Icon button in the Menu Bar.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"editing_wordpress_sites\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Editing Remote WordPress Websites via FTP\",\n \"contents\": \"\\n

Editing Remote WordPress Websites via FTP

\\n
\\n\\n
\\n\\n

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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"installing_npm_modules\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Installing NPM Modules\",\n \"contents\": \"\\n

Installing NPM Modules

\\n

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
  1. Launch the command line by hitting Shift-Escape. You can also go to View > Command Line if it's not visible.
  2. \\n
  3. Type npm install express, and wait for the npm install process to complete.
  4. \\n
  5. Create a new JavaScript file, and paste the following code:
  6. \\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 \\\"The button in the menu bar.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"installing_python_packages\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Installing Python Packages\",\n \"contents\": \"\\n

Installing Python Packages

\\n

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:

\\n
>>> help('modules')
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"installing_ruby_gems\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Installing Ruby Gems\",\n \"contents\": \"\\n

Installing Ruby Gems

\\n

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 },\n {\n \"filename\": \"running_a_rails_app\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Running a Rails App\",\n \"contents\": \"\\n
\\n

Running a Rails App

\\n

Cloud9 IDE also supports the ability to run a Rails application. The rails command is only available on the terminal.

\\n

To run a rails application:

\\n
    \\n
  1. Open the terminal and type gem install rails
  2. \\n
  3. When done, type rails new example -d mysql
  4. \\n
  5. Edit your database configuration in configs/database.yml
  6. \\n
  7. Type rails s -b $IP -p $PORT
  8. \\n
\\n

That's it! Your rails app will now be running.

\\n

Note:

http://<workspacename>-c9-<username>.c9.io should be running your application.\\n\\n
\\n

Do not try to access the project through the IP address and port number rails returns to you--it won't work!

\\n

Use MySQL in your rails app

\\n
    \\n
  1. Setup MySQl - note your DB connect parameters

    \\n
  2. \\n
  3. edit configs/database.yml

    \\n
  4. \\n
\\n
development:\\n  adapter: mysql2\\n  encoding: utf8\\n  database: c9\\n  username: <%=ENV['C9_USER']%>\\n  host: <%=ENV['IP']%>
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"running_and_debugging_code\",\n \"mtime\": 1416491265000,\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 \\\"Icon 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

\\\"Run

\\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:
\\\"Console

\\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 \\\"Run 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:
\\\"The

\\n

This toolbar, however, grants you the following capabilities:

\\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
Toolbar IconDebugging FunctionDescription
\\\"DebuggingDebugging NavigationThis 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.
\\\"IconCallstackThis 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:
\\\"Callstack
\\\"IconInteractive ModeLets 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\\\"Interactive
\\\"IconVariable InspectionThis shows all the related variables (including functions) that are present in the current context:\\n\\\"Variable
\\\"IconBreakpoint ListAt any point during your coding or debugging session, you can click on the gutter to apply a breakpoint: \\\"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

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.
\\\"Live

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"running_wordpress_on_cloud9\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Running WordPress on Cloud9\",\n \"contents\": \"\\n
\\n

Running WordPress on Cloud9

\\n

WordPress is web software you can use to create websites or blogs.\\nYou can develop and host WordPress websites entirely on Cloud9 IDE

\\n

Creating a wordpress workspace

\\n

Create a WordPress workspace from the WordPress template on your Cloud9 dashboard

\\n

Note:

We will download, extract and configure WordPress for you.\\n\\n
\\n

In order to run WordPress, you need a database to host your posts, articles, etc.

\\n

You can use MySQL with our utility script mysql-ctl as explained in MySQL Setup

\\n

Running the website

\\n

To start MySQL server and create the required database, type in the terminal:

\\n
mysql-ctl start
\\n

Open index.php in your workspace root and click the Run button

\\n

You can check the generated config for you In wp-config.php (you don't need to change anything there)

\\n
define('DB_NAME', 'c9');\\ndefine('DB_USER', getenv('C9_USER'));\\ndefine('DB_PASSWORD', '');\\ndefine('DB_HOST', getenv('IP'));\\ndefine('WP_SITEURL', 'http://' . getenv('C9_PROJECT') . '.' . getenv('C9_USER') . '.c9.io');
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"terminal_monitor\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"The Terminal Monitor\",\n \"contents\": \"\\n

The Terminal Monitor

\\n

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

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"writing_a_go_app\",\n \"mtime\": 1416491265000,\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

\\\"Create

\\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:

\\n
wget https://go.googlecode.com/files/go1.1.1.linux-amd64.tar.gz
\\n

Note:

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):

\\n
vim ~/.bashrc
\\n

Add the following lines to your .bashrc file:

\\n
# setup go configuration \\nexport GOROOT=$HOME/go \\nexport PATH=$PATH:$GOROOT/bin \\n\\n# setup workspace t\\nexport GOPATH=$HOME/562166 \\nexport PATH=$PATH:$GOPATH/bin
\\n

Update the GOPATH line above to use the workspace directory you noted earlier \\n(so don't use $HOME/562166).

\\n

After you save your .bashrc file, load the new settings:

\\n
source ~/.bashrc
\\n

That's it! You should be good to Go (pun intended).

\\n

Note:

Thanks to Scotty Moon for writing an article about Go on Cloud9 IDE\\nand letting us use it for documentation!
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"writing_a_php_app\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Writing a PHP App\",\n \"contents\": \"\\n
\\n

Writing a PHP App

\\n

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:

\\n
<html>\\n  <head>\\n   <title>PHP Test</title>\\n  </head>\\n  <body>\\n   <?php echo '<p>Hello World</p>'; ?> \\n  </body>\\n</html>
\\n

Next, open the Run & Debug panel, at the left of the IDE. From the Runtime dropdown, select Apache+PHP. Then, click on the \\\"The button in the top menu bar.

\\n

The console should now spit out a message about how your Apache server is running, something similar to this:

\\n
Running Apache Process\\nTip: you can access long running processes, like a server, at 'http://php_hello.gjtorikian.c9.io'.
\\n

Clicking on that link gets you to your PHP page. For a more in-depth workflow, see the article on running WordPress entirely on Cloud9.

\\n

Modifying php.ini

\\n

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\": \"writing_a_python_app\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Writing a Python App\",\n \"contents\": \"\\n

Writing a Python App

\\n

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 \\\"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_ruby_app\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Writing a Ruby App\",\n \"contents\": \"\\n
\\n

Writing a Ruby App

\\n

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 \\\"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

To use rvm, open the terminal and type:

\\n
# to switch to version 1.8.7\\nrvm use 1.8\\nrvm use 1.8.7 \\n\\n# to switch to version 1.9.3\\nrvm use 1.9\\nrvm use 1.9.3
\\n

However, if you like, you can install the "real" rvm by executing the following command in the terminal:

\\n
curl -L https://get.rvm.io | bash -s stable
\\n

To grab the latest rvm AND the latest Ruby version, type:

\\n
curl -L https://get.rvm.io | bash -s stable --ruby
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"creating_new_workspace\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"Creating a New Workspace\",\n \"contents\": \"\\n
\\n

Creating a New Workspace

\\n

Cloud9 supports three types of workspaces:

\\n
    \\n
  1. Hosted
  2. \\n
  3. FTP
  4. \\n
  5. SSH
  6. \\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

\\\"New

\\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

\\\"Options

\\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.
  • \\n
  • FTP allows you to upload your files directly to an FTP server that you have access to
  • \\n
  • 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

\\\"New

\\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

\\\"Options

\\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:

\\n

\\\"Options

\\n

Paste the following GitHub URL in the textbox labeled Source URL: https://github.com/mattpardee/geekdots

\\n

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

\\\"Delete

\\n

Clicking on the Delete button prompts the IDE to ask for confirmation:
\\\"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\": \"writing_nodejs_hello_world\",\n \"mtime\": 1416491265000,\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:

\\n
var http = require('http');\\nhttp.createServer(function (req, res) {\\n    res.writeHead(200, {'Content-Type': 'text/plain'});\\n    res.end('Hello World\\\\n');\\n}).listen(process.env.PORT, process.env.IP);
\\n

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 \\\"The button in the menu bar, the console will print out the following message:
\\\"Console

\\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:
\\\"Node.js.

\\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.

\\n

To use nvm, open the terminal and type:

\\n
# to switch to version 0.6.21\\nnvm use v0.67 \\n\\n# to switch to the latest 0.8.x\\nnvm use v0.8
\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"ftp_workspaces\",\n \"mtime\": 1416491265000,\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 \\\"Project 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):
\\\"New

\\n

In the pop-up window that appears, select FTP for the project type:

\\n

\\\"FTP

\\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

\\\"New

\\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

\\\"Demonstrating

\\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\": \"run_your_own_workspace\",\n \"mtime\": 1416491265000,\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
  1. Node.js installed on the server. This version must be between Node.js version 0.6.16 and the latest 0.8.x.
  2. \\n
  3. 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.
  4. \\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 \\\"Project 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):
\\\"New

\\n

In the pop-up window that appears, select SSH for the project type:
\\\"SSH

\\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\\\"New

\\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.

\\n\\n
\\n
\\n \"\n },\n {\n \"filename\": \"setting_up_bitbucket_workspace\",\n \"mtime\": 1416491265000,\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

\\\"Add-on

\\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

\\\"Bitbucket

\\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 \\\"Project to add a new project:

\\n

\\\"New

\\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

\\\"New

\\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: \\\"Start

\\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 \\\"Project, 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

\\\"Clone

\\n

You can find an examples of a Bitbucket URL on any of their repo description pages:

\\n

\\\"Bitbucket

\\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

\\\"Bitbucket

\\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_github_workspace\",\n \"mtime\": 1416491265000,\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

\\\"Add-on

\\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

\\\"GitHub

\\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 \\\"Project to add a new project:

\\n

\\\"New

\\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

\\\"New

\\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: \\\"Start

\\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 \\\"Project, 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

\\\"Clone

\\n

You can find an examples of a GitHub URL on any of their repo description pages:

\\n

\\\"GitHub

\\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

\\\"GitHub

\\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\": \"ssh_workspaces\",\n \"mtime\": 1416491265000,\n \"pageTitle\": \"SSH Workspaces\",\n \"contents\": \"\\n
\\n

SSH Workspaces

\\n

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_gitlab_workspace\",\n \"mtime\": 1416491265000,\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/.

\\n

GitLab.com offers services for on-premise GitLab installations \\nand free private git repositoring on GitLab Cloud \\nwith unlimited repo's and collaborators.

\\n

To use your on-premise GitLab installation or GitLab Cloud please see \\nthe instructions for cloning from a url.

\\n\\n
\\n
\\n \"\n }\n ],\n \"toc\": \"\\n \\n \",\n \"baseUrl\": \"https://docs.c9.io\",\n \"title\": \"Cloud9 User Documentation\"\n}" }, { "filename": "setting_up_hosted_mysql", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "MySQL", "contents": "

MySQL

\n

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
  • \n
  • Cross-platform support
  • \n
  • Stored procedures
  • \n
  • Triggers
  • \n
  • Cursors
  • \n
  • Updatable Views
  • \n
  • Information schema
  • \n
  • Many more
  • \n
\n

Using MySQL with Cloud9

\n

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
  1. Register with Xeround
  2. \n
  3. Log in to your controlpanel
  4. \n
  5. Choose 'create new'
  6. \n
  7. Choose a datacenter
  8. \n
  9. Enter your Database name, Username and Password and create
  10. \n
  11. Select your newly created instance and click the 'External DNS Hostname' link provided to log into PHPMyAdmin
  12. \n
  13. Create and import/setup your database
  14. \n
\n

Cloud9

\n
    \n
  1. Log into your account
  2. \n
  3. Create a new project (or use an existing one)
  4. \n
  5. 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         ?>
    \n
  6. \n
  7. Save the file
  8. \n
  9. Run the file
  10. \n
\n

Source

\n

Courtesy of Roger Qui of Polycadamy. This guide is elaborately explained in a video tutorial

\n\n
" }, { - "filename": "project_bar", - "mtime": 1412172002000, - "pageTitle": "The Project Bar", - "contents": "\n

The Project Bar

\n

Note:

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: \"The

\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.
  • \n
  • Run & Debug lets you run and debug your code live, in the browser. For more information, see the section on "Running and Debugging Your Code".
  • \n
  • Deploy allows you to deploy to a variety of services. For more information, see the section on "Deploying Your Code".
  • \n
  • Preferences lets you change the behavior of the editor. The Preferences documentation is provided on its own page.
  • \n
\n

Clicking on any button expands its menu. Clicking on an expanded menu causes it to collapse, which gives you more room in the IDE to work with.

\n\n
" + "filename": "setting_up_mongodb", + "mtime": 1416491265000, + "pageTitle": "MongoDB", + "contents": "

MongoDB

\n

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.

\n
$ mkdir data\n$ echo 'mongod --bind_ip=$IP --dbpath=data --nojournal --rest \"$@\"' > mongod\n$ chmod a+x mongod
\n

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:

\n

Node.JS apps

\n

Mongoose
\nNode-Mongodb-Native

\n

Shell Access

\n

To access a shell prompt for the above MongoDB run the following.

\n
$ mongo
\n

Check out docs.mongodb.org for details on how to use the shell

\n\n
" }, { - "filename": "tab_functions", - "mtime": 1412172002000, - "pageTitle": "Tab Functions", - "contents": "

Tab Functions

\n

Note:

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

\"The

\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:
\"The

\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.

\n\n
" + "filename": "setting_up_mysql", + "mtime": 1416491265000, + "pageTitle": "MySQL", + "contents": "

MySQL

\n

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
  • \n
  • Cross-platform support
  • \n
  • Stored procedures
  • \n
  • Triggers
  • \n
  • Cursors
  • \n
  • Updatable Views
  • \n
  • Information schema
  • \n
  • Many more
  • \n
\n

Using MySQL with Cloud9

\n

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 \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Option\n Value\n Comment\n
Hostname$IPThe same local IP as the application you run on Cloud9
Port3306The default MySQL port number
User$C9_USERYour Cloud9 user name
Password-No password since you can only access the DB from within the workspace
Databasec9The database name
\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
\n\n
" }, { - "filename": "status_bar", - "mtime": 1412172002000, - "pageTitle": "Status Bar", - "contents": "\n

Status Bar

\n

Note:

this feature is deprecated\n\n
\n

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: \"The. 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 \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Preference NameDescription
Show InvisiblesShows invisibles characters in the editor, like tabs and line breaks
Wraps LinesWraps lines according to the line margin defined, or your browser's window. Otherwise, lines run off the current viewport.
Code FoldingWhen enabled, allows you to show or hide "blocks" of code
Full Line SelectionWhen highlighting lines, this option will highlight all ending whitespace, until the end of the editor window
Highlight Active LinePresents a darker shade in the code editor to indicate which line you're currently on
Show Indent GuidesShows the indent guides in the editor, letting you see your code's nestings
Show GutterShows the gutter in the editor, which indicates line numbers, warnings, and errors
Highlight Selected WordIf 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 Scrollbarhen 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 SizeChanges the font size of the code in the editor
Show Print MarginShows (and defines) the number of characters possible in line, before it wraps
Soft TabsIndicates how many spaces a single tab represents
Mouse Scroll SpeedDefines the speed of the mouse scrolls
\n
\n
" + "filename": "setting_up_phpmyadmin", + "mtime": 1416497235000, + "pageTitle": "PHPMyAdmin", + "contents": "

PHPMyAdmin

\n

PHPMyAdmin provides an easy to use web interface to manage your MySQL database/s

\n

PHPMyAdmin's most common features

\n
    \n
  • Import data from CSV and SQL
  • \n
  • Export data to various formats: CSV, SQL, XML, PDF, Word, Excel, LaTeX and others
  • \n
  • Creating PDF graphics of the database layout
  • \n
  • Creating complex queries using Query-by-Example (QBE)
  • \n
  • Searching globally in a database or a subset of it
  • \n
  • Transforming stored data into any format using a set of predefined functions, like displaying BLOB-data as image or download-link
  • \n
  • Live charts to monitor MySQL server activity like connections, processes, CPU/Memory usage, etc.
  • \n
  • Many more
  • \n
\n

Using PHPMyAdmin with Cloud9

\n

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.

\n
# Install PHPMyAdmin\n$ phpmyadmin-ctl install
\n

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.

\n\n
" }, { - "filename": "setting_up_mysql", - "mtime": 1412172002000, - "pageTitle": "MySQL", - "contents": "

MySQL

\n

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
  • \n
  • Cross-platform support
  • \n
  • Stored procedures
  • \n
  • Triggers
  • \n
  • Cursors
  • \n
  • Updatable Views
  • \n
  • Information schema
  • \n
  • Many more
  • \n
\n

Using MySQL with Cloud9

\n

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 \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Option\n Value\n Comment\n
Hostname$IPThe same local IP as the application you run on Cloud9
Port3306The default MySQL port number
User$C9_USERYour Cloud9 user name
Password-No password since you can only access the DB from within the workspace
Databasec9The database name
\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
\n\n
" + "filename": "setting_up_redis", + "mtime": 1416491265000, + "pageTitle": "Redis", + "contents": "

Redis

\n

Running

\n

Cloud9 workspaces come with redis pre-installed.

\n

Start the server:

\n
sudo service redis-server start
\n

Connect with the client:

\n
./redis-cli
\n

Drivers

\n

See http://redis.io/clients for drivers.

\n\n
" + }, + { + "filename": "setting_up_postgresql", + "mtime": 1416491265000, + "pageTitle": "PostgreSQL", + "contents": "

PostgreSQL

\n

Installing PostgreSQL on a Cloud9 workspace

\n

PostgreSQL comes preinstalled on every Cloud9 workspace, yay.

\n

Start the PostgreSQL service

\n
$ sudo service postgresql start
\n

Set the "postgres" user password

\n
$ sudo sudo -u postgres psql                                                                                  \npsql (9.3.4, server 9.3.5)\nType \"help\" for help.\n\npostgres=# \\password\nEnter new password: \nEnter it again: \npostgres=# \\q
\n

Connect to the service

\n
$ sudo sudo -u postgres psql                                                                                  
\n

Create a PostgreSQL database

\n

Make sure you have logged into the PostgreSQL terminal and then you can just run:

\n
$ sudo sudo -u postgres psql                                                                                  \npostgres=# create database \"groceries\";
\n

List all databases

\n
$ sudo sudo -u postgres psql                                                                                  \npostgres=# \\list
\n\n
" + }, + { + "filename": "setting_up_sqlite3", + "mtime": 1416491265000, + "pageTitle": "SQLite", + "contents": "

SQLite

\n

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

\"Screenshot

\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.

\n

To exit sqlite, use the command: .exit.

\n

Drivers

\n

SQLite has drivers for all supported runtimes.

\n

Following are the most commonly used drivers:

\n

Node.JS apps

\n

node-sqlite

\n

Rails apps

\n

In your Gemfile, include the line:

\n
gem 'sqlite3'
\n

and in configs/database.yml, make sure you use:

\n
adapter: sqlite3\ndatabase: db/development.db
\n\n
" }, { "filename": "common_errors", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Common errors", "contents": "

Common errors

\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:

\n
COMMAND PID   USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME\napache2 699 ubuntu    4u  IPv6 83213152      0t0  TCP *:http-alt (LISTEN)
\n

You now can kill that proccess. Make sure you replace PID with the ID of the process.

\n
// Kill the process\nkill -9 PID
\n

For the console wizards:

\n
kill -9 $(lsof -i:$PORT -t)
\n\n
" }, - { - "filename": "setting_up_mongodb", - "mtime": 1412172002000, - "pageTitle": "MongoDB", - "contents": "

MongoDB

\n

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.

\n
$ mkdir data\n$ echo 'mongod --bind_ip=$IP --dbpath=data --nojournal --rest \"$@\"' > mongod\n$ chmod a+x mongod
\n

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:

\n

Node.JS apps

\n

Mongoose
\nNode-Mongodb-Native

\n

Shell Access

\n

To access a shell prompt for the above MongoDB run the following.

\n
$ mongo
\n

Check out docs.mongodb.org for details on how to use the shell

\n\n
" - }, { "filename": "creating_coffeescript_app", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Create a CoffeeScript Project", "contents": "\n

Create a CoffeeScript Project

\n

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:

\n
git clone git://github.com/fjakobs/cloud9-coffeescript-example.git
\n

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:

\n
http = require \"http\"\n\nmodule.exports = http.createServer((req, res) ->\n    res.writeHead 200, 'Content-Type': 'text/plain'\n    res.end 'Hello World\\n'
\n

Next, run the server.js file and open the URL indicated in the console:

\n

\"Messages

\n

The result is:

\n

\"The

\n

To stop your application, go back to the editor and click on the \"Icon button in the Menu Bar.

\n\n
" }, { "filename": "editing_wordpress_sites", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Editing Remote WordPress Websites via FTP", "contents": "\n

Editing Remote WordPress Websites via FTP

\n
\n\n
\n\n

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.

\n\n
" }, - { - "filename": "setting_up_postgresql", - "mtime": 1412172002000, - "pageTitle": "PostgreSQL", - "contents": "

PostgreSQL

\n

Installing PostgreSQL on a Cloud9 workspace

\n

PostgreSQL comes preinstalled on every Cloud9 workspace, yay.

\n

Start the PostgreSQL service

\n
$ sudo service postgresql start
\n

Set the "postgres" user password

\n
$ sudo sudo -u postgres psql                                                                                  \npsql (9.3.4, server 9.3.5)\nType \"help\" for help.\n\npostgres=# \\password\nEnter new password: \nEnter it again: \npostgres=# \\q
\n

Connect to the service

\n
$ sudo sudo -u postgres psql                                                                                  
\n

Create a PostgreSQL database

\n

Make sure you have logged into the PostgreSQL terminal and then you can just run:

\n
$ sudo sudo -u postgres psql                                                                                  \npostgres=# create database \"groceries\";
\n

List all databases

\n
$ sudo sudo -u postgres psql                                                                                  \npostgres=# \\list
\n\n
" - }, { "filename": "installing_npm_modules", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Installing NPM Modules", "contents": "\n

Installing NPM Modules

\n

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
  1. Launch the command line by hitting Shift-Escape. You can also go to View > Command Line if it's not visible.
  2. \n
  3. Type npm install express, and wait for the npm install process to complete.
  4. \n
  5. Create a new JavaScript file, and paste the following code:
  6. \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 \"The button in the menu bar.

\n\n
" }, { "filename": "installing_python_packages", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Installing Python Packages", "contents": "\n

Installing Python Packages

\n

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:

\n
>>> help('modules')
\n\n
" }, { - "filename": "setting_up_redis", - "mtime": 1416998221000, - "pageTitle": "Redis", - "contents": "

Redis

\n

Running

\n

Cloud9 workspaces come with redis pre-installed.

\n

Start the server:

\n
sudo service redis-server start
\n

Connect with the client:

\n
./redis-cli
\n

Drivers

\n

See http://redis.io/clients for drivers.

\n\n
" - }, - { - "filename": "setting_up_sqlite3", - "mtime": 1412172002000, - "pageTitle": "SQLite", - "contents": "

SQLite

\n

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

\"Screenshot

\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.

\n

To exit sqlite, use the command: .exit.

\n

Drivers

\n

SQLite has drivers for all supported runtimes.

\n

Following are the most commonly used drivers:

\n

Node.JS apps

\n

node-sqlite

\n

Rails apps

\n

In your Gemfile, include the line:

\n
gem 'sqlite3'
\n

and in configs/database.yml, make sure you use:

\n
adapter: sqlite3\ndatabase: db/development.db
\n\n
" + "filename": "installing_ruby_gems", + "mtime": 1416491265000, + "pageTitle": "Installing Ruby Gems", + "contents": "\n

Installing Ruby Gems

\n

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
" }, { "filename": "running_a_rails_app", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Running a Rails App", "contents": "

Running a Rails App

\n

Cloud9 IDE also supports the ability to run a Rails application. The rails command is only available on the terminal.

\n

To run a rails application:

\n
    \n
  1. Open the terminal and type gem install rails
  2. \n
  3. When done, type rails new example -d mysql
  4. \n
  5. Edit your database configuration in configs/database.yml
  6. \n
  7. Type rails s -b $IP -p $PORT
  8. \n
\n

That's it! Your rails app will now be running.

\n

Note:

http://<workspacename>-c9-<username>.c9.io should be running your application.\n\n
\n

Do not try to access the project through the IP address and port number rails returns to you--it won't work!

\n

Use MySQL in your rails app

\n
    \n
  1. Setup MySQl - note your DB connect parameters

    \n
  2. \n
  3. edit configs/database.yml

    \n
  4. \n
\n
development:\n  adapter: mysql2\n  encoding: utf8\n  database: c9\n  username: <%=ENV['C9_USER']%>\n  host: <%=ENV['IP']%>
\n\n
" }, { - "filename": "installing_ruby_gems", - "mtime": 1412172002000, - "pageTitle": "Installing Ruby Gems", - "contents": "\n

Installing Ruby Gems

\n

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
" + "filename": "running_and_debugging_code", + "mtime": 1416491265000, + "pageTitle": "Running and Debugging Your Code", + "contents": "

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 \"Icon 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

\"Run

\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:
\"Console

\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 \"Run 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:
\"The

\n

This toolbar, however, grants you the following capabilities:

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Toolbar IconDebugging FunctionDescription
\"DebuggingDebugging NavigationThis 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.
\"IconCallstackThis 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:
\"Callstack
\"IconInteractive ModeLets 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\"Interactive
\"IconVariable InspectionThis shows all the related variables (including functions) that are present in the current context:\n\"Variable
\"IconBreakpoint ListAt any point during your coding or debugging session, you can click on the gutter to apply a breakpoint: \"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

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.
\"Live

\n\n
" }, { "filename": "running_wordpress_on_cloud9", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Running WordPress on Cloud9", "contents": "

Running WordPress on Cloud9

\n

WordPress is web software you can use to create websites or blogs.\nYou can develop and host WordPress websites entirely on Cloud9 IDE

\n

Creating a wordpress workspace

\n

Create a WordPress workspace from the WordPress template on your Cloud9 dashboard

\n

Note:

We will download, extract and configure WordPress for you.\n\n
\n

In order to run WordPress, you need a database to host your posts, articles, etc.

\n

You can use MySQL with our utility script mysql-ctl as explained in MySQL Setup

\n

Running the website

\n

To start MySQL server and create the required database, type in the terminal:

\n
mysql-ctl start
\n

Open index.php in your workspace root and click the Run button

\n

You can check the generated config for you In wp-config.php (you don't need to change anything there)

\n
define('DB_NAME', 'c9');\ndefine('DB_USER', getenv('C9_USER'));\ndefine('DB_PASSWORD', '');\ndefine('DB_HOST', getenv('IP'));\ndefine('WP_SITEURL', 'http://' . getenv('C9_PROJECT') . '.' . getenv('C9_USER') . '.c9.io');
\n\n
" }, { - "filename": "running_and_debugging_code", - "mtime": 1412172002000, - "pageTitle": "Running and Debugging Your Code", - "contents": "

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 \"Icon 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

\"Run

\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:
\"Console

\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 \"Run 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:
\"The

\n

This toolbar, however, grants you the following capabilities:

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Toolbar IconDebugging FunctionDescription
\"DebuggingDebugging NavigationThis 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.
\"IconCallstackThis 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:
\"Callstack
\"IconInteractive ModeLets 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\"Interactive
\"IconVariable InspectionThis shows all the related variables (including functions) that are present in the current context:\n\"Variable
\"IconBreakpoint ListAt any point during your coding or debugging session, you can click on the gutter to apply a breakpoint: \"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

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.
\"Live

\n\n
" - }, - { - "filename": "writing_a_python_app", - "mtime": 1412172002000, - "pageTitle": "Writing a Python App", - "contents": "\n

Writing a Python App

\n

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 \"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": "terminal_monitor", + "mtime": 1416491265000, + "pageTitle": "The Terminal Monitor", + "contents": "\n

The Terminal Monitor

\n

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

\n\n
" }, { "filename": "writing_a_go_app", - "mtime": 1412172002000, + "mtime": 1416491265000, "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

\"Create

\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:

\n
wget https://go.googlecode.com/files/go1.1.1.linux-amd64.tar.gz
\n

Note:

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):

\n
vim ~/.bashrc
\n

Add the following lines to your .bashrc file:

\n
# setup go configuration \nexport GOROOT=$HOME/go \nexport PATH=$PATH:$GOROOT/bin \n\n# setup workspace t\nexport GOPATH=$HOME/562166 \nexport PATH=$PATH:$GOPATH/bin
\n

Update the GOPATH line above to use the workspace directory you noted earlier \n(so don't use $HOME/562166).

\n

After you save your .bashrc file, load the new settings:

\n
source ~/.bashrc
\n

That's it! You should be good to Go (pun intended).

\n

Note:

Thanks to Scotty Moon for writing an article about Go on Cloud9 IDE\nand letting us use it for documentation!
\n\n
" }, { - "filename": "terminal_monitor", - "mtime": 1412172002000, - "pageTitle": "The Terminal Monitor", - "contents": "\n

The Terminal Monitor

\n

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

\n\n
" + "filename": "writing_a_php_app", + "mtime": 1416491265000, + "pageTitle": "Writing a PHP App", + "contents": "

Writing a PHP App

\n

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:

\n
<html>\n  <head>\n   <title>PHP Test</title>\n  </head>\n  <body>\n   <?php echo '<p>Hello World</p>'; ?> \n  </body>\n</html>
\n

Next, open the Run & Debug panel, at the left of the IDE. From the Runtime dropdown, select Apache+PHP. Then, click on the \"The button in the top menu bar.

\n

The console should now spit out a message about how your Apache server is running, something similar to this:

\n
Running Apache Process\nTip: you can access long running processes, like a server, at 'http://php_hello.gjtorikian.c9.io'.
\n

Clicking on that link gets you to your PHP page. For a more in-depth workflow, see the article on running WordPress entirely on Cloud9.

\n

Modifying php.ini

\n

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
" + }, + { + "filename": "writing_a_python_app", + "mtime": 1416491265000, + "pageTitle": "Writing a Python App", + "contents": "\n

Writing a Python App

\n

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 \"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_ruby_app", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Writing a Ruby App", "contents": "

Writing a Ruby App

\n

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 \"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

To use rvm, open the terminal and type:

\n
# to switch to version 1.8.7\nrvm use 1.8\nrvm use 1.8.7 \n\n# to switch to version 1.9.3\nrvm use 1.9\nrvm use 1.9.3
\n

However, if you like, you can install the "real" rvm by executing the following command in the terminal:

\n
curl -L https://get.rvm.io | bash -s stable
\n

To grab the latest rvm AND the latest Ruby version, type:

\n
curl -L https://get.rvm.io | bash -s stable --ruby
\n\n
" }, { "filename": "creating_new_workspace", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Creating a New Workspace", "contents": "

Creating a New Workspace

\n

Cloud9 supports three types of workspaces:

\n
    \n
  1. Hosted
  2. \n
  3. FTP
  4. \n
  5. SSH
  6. \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

\"New

\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

\"Options

\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.
  • \n
  • FTP allows you to upload your files directly to an FTP server that you have access to
  • \n
  • 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

\"New

\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

\"Options

\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:

\n

\"Options

\n

Paste the following GitHub URL in the textbox labeled Source URL: https://github.com/mattpardee/geekdots

\n

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

\"Delete

\n

Clicking on the Delete button prompts the IDE to ask for confirmation:
\"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
" }, - { - "filename": "ftp_workspaces", - "mtime": 1412172002000, - "pageTitle": "Setting up an FTP project", - "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 \"Project 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):
\"New

\n

In the pop-up window that appears, select FTP for the project type:

\n

\"FTP

\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

\"New

\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

\"Demonstrating

\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
" - }, { "filename": "writing_nodejs_hello_world", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Writing and Running a Node.js Program", "contents": "

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:

\n
var http = require('http');\nhttp.createServer(function (req, res) {\n    res.writeHead(200, {'Content-Type': 'text/plain'});\n    res.end('Hello World\\n');\n}).listen(process.env.PORT, process.env.IP);
\n

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 \"The button in the menu bar, the console will print out the following message:
\"Console

\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:
\"Node.js.

\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.

\n

To use nvm, open the terminal and type:

\n
# to switch to version 0.6.21\nnvm use v0.67 \n\n# to switch to the latest 0.8.x\nnvm use v0.8
\n\n
" }, { - "filename": "writing_a_php_app", - "mtime": 1412172002000, - "pageTitle": "Writing a PHP App", - "contents": "

Writing a PHP App

\n

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:

\n
<html>\n  <head>\n   <title>PHP Test</title>\n  </head>\n  <body>\n   <?php echo '<p>Hello World</p>'; ?> \n  </body>\n</html>
\n

Next, open the Run & Debug panel, at the left of the IDE. From the Runtime dropdown, select Apache+PHP. Then, click on the \"The button in the top menu bar.

\n

The console should now spit out a message about how your Apache server is running, something similar to this:

\n
Running Apache Process\nTip: you can access long running processes, like a server, at 'http://php_hello.gjtorikian.c9.io'.
\n

Clicking on that link gets you to your PHP page. For a more in-depth workflow, see the article on running WordPress entirely on Cloud9.

\n

Modifying php.ini

\n

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
" - }, - { - "filename": "setting_up_bitbucket_workspace", - "mtime": 1412172002000, - "pageTitle": "Setting Up a Bitbucket Workspace", - "contents": "

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

\"Add-on

\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

\"Bitbucket

\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 \"Project to add a new project:

\n

\"New

\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

\"New

\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: \"Start

\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 \"Project, 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

\"Clone

\n

You can find an examples of a Bitbucket URL on any of their repo description pages:

\n

\"Bitbucket

\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

\"Bitbucket

\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
" + "filename": "ftp_workspaces", + "mtime": 1416491265000, + "pageTitle": "Setting up an FTP project", + "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 \"Project 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):
\"New

\n

In the pop-up window that appears, select FTP for the project type:

\n

\"FTP

\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

\"New

\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

\"Demonstrating

\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
" }, { "filename": "run_your_own_workspace", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Running Your Own SSH Workspace", "contents": "

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
  1. Node.js installed on the server. This version must be between Node.js version 0.6.16 and the latest 0.8.x.
  2. \n
  3. 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.
  4. \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 \"Project 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):
\"New

\n

In the pop-up window that appears, select SSH for the project type:
\"SSH

\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\"New

\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.

\n\n
" }, { - "filename": "ssh_workspaces", - "mtime": 1416998221000, - "pageTitle": "SSH Workspaces", - "contents": "

SSH Workspaces

\n

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
" + "filename": "setting_up_bitbucket_workspace", + "mtime": 1416491265000, + "pageTitle": "Setting Up a Bitbucket Workspace", + "contents": "

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

\"Add-on

\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

\"Bitbucket

\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 \"Project to add a new project:

\n

\"New

\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

\"New

\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: \"Start

\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 \"Project, 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

\"Clone

\n

You can find an examples of a Bitbucket URL on any of their repo description pages:

\n

\"Bitbucket

\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

\"Bitbucket

\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
" }, { "filename": "setting_up_github_workspace", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Setting Up a GitHub Workspace", "contents": "

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

\"Add-on

\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

\"GitHub

\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 \"Project to add a new project:

\n

\"New

\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

\"New

\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: \"Start

\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 \"Project, 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

\"Clone

\n

You can find an examples of a GitHub URL on any of their repo description pages:

\n

\"GitHub

\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

\"GitHub

\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
" }, + { + "filename": "ssh_workspaces", + "mtime": 1416491265000, + "pageTitle": "SSH Workspaces", + "contents": "

SSH Workspaces

\n

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
" + }, { "filename": "setting_up_gitlab_workspace", - "mtime": 1412172002000, + "mtime": 1416491265000, "pageTitle": "Setting Up a GitLab workspace", "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/.

\n

GitLab.com offers services for on-premise GitLab installations \nand free private git repositoring on GitLab Cloud \nwith unlimited repo's and collaborators.

\n

To use your on-premise GitLab installation or GitLab Cloud please see \nthe instructions for cloning from a url.

\n\n
" } ], - "toc": "\n \n ", + "toc": "\n \n ", "baseUrl": "https://docs.c9.io", "title": "Cloud9 User Documentation" } \ No newline at end of file diff --git a/out/index.html b/out/index.html index 3707c8f..5414149 100644 --- a/out/index.html +++ b/out/index.html @@ -134,7 +134,11 @@