Snippets

Ian Geiser How To Configure Cloud9 for ownCloud Development

Created by Ian Geiser last modified

#How To Configure Cloud9 for ownCloud Development

  • Create a "Custom" project on c9.io

  • In the custom workspace add the php dependencies:

sudo apt-get update
sudo apt-get install php5-sqlite php5-curl phpunit
  • The php installs will cause apache to restart so they need to be stopped again.
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/php5-fpm stop
  • Add custom settings for the php cli
cat << EOF | sudo tee /etc/php5/cli/conf.d/99-ocs.ini
default_charset = UTF-8
output_buffering = off
EOF
sudo pip3 install ocdev
  • Setup the ocdev environment in the home directory not ~/workspace
cd $HOME
ocdev setup core
mkdir -p core/data
  • Start your awesome application
cd $HOME
ocdev startapp MyApp
  • Move the app template into your workspace so it is the only thing that is managed by your c9 project.
mv myapp/* ~/workspace
mv myapp/.* ~/workspace
rmdir MyApp
  • Then link the application into the right place in the ownCloud apps directory
ln -s $HOME/workspace $HOME/core/apps/MyApp
  • Setup the runner for live previews using the "Run -> Run With -> Shell Command" and set command to: php -S $IP:$PORT -t $HOME/core

  • Now you are ready to get some code done!

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.