For this tutorial, we’ll show you how to work with our Containers, although, you can set up your SSH/FTP server right away, or connect to Google Drive, Dropbox, Amazon S3, and even import your existing repository or create your DigitalOcean Droplet! Containers are in essence your own Virtual Private Servers which run invisibly in the background of Codeanywhere, each one with its own amount of RAM, Disk space and Processing power. Containers give you the ability to provision any Development Environment you like. You can even choose between one of the predefined stacks.
In order to start a new Container, go to File -> New Connections -> Container.
Now, you can choose which predefined stack you’d use. In this tutorial, we’ll create a simple PHP container. Choose which OS you’d like to use - Ubuntu or CentOS - and decide whether you’d like for your Container to be Always on - meaning it will be turned on even when you’re offline.
Wait for a few seconds until your Container is deployed, and you can start coding right away.
With a right click on your Container, choose to Create a File, and name it “index.php”.
You can see in your file tree that your Container is already updated! Go to your file and enter some code - in this example we created a simple “Hello World” app.
Save it (just like anywhere else with CMD + S, for Mac, or Ctrl + S, for Windows), and now, all you have to do is select “Run” button with a right click on your app:
and you’ll be able to preview your new app!
That’s about it!
You can now share your code or work with your colleagues in the same way you’d do that with Google Docs with our collaboration feature, and even share your terminal! If they make some changes you’re not happy with, use our Revisions feature, and get your code back to where you’d like! Sounds interesting? Read our online documentation and learn more about the rest of the cool features we have to offer! :)