/krustykookies

Yummy krusty kookies!

Primary LanguagePHP

krustykookies

Yummy krusty kookies!

Installation

  • Set up git & clone the repo to e.g. /srv/web/
    https://help.github.com/articles/set-up-git

  • Optional: If you want to incorporate the project directly to Eclipse then go to File->Import->Projects from Git->Uri. Enter the URI of the repository (https://github.com/marcuslindfeldt/krustykookies.git) and your user details. Click Next->Next->Next->Finish. The New Project wizard will show up. Select PHP Project. Choose a project name. Specify php version 5.4 and enable java support for better autocompletion. Click Finish and your done!

    OBS! This assumes that you already have the Eclipse PDT & EGit plugins installed.

  • Install webserver & other important packages (ubuntu)
    Run the following commands from the terminal:

sudo apt-get install php5 php5-cli mysql-client mysql-server curl
  • Get the php dependency management system, Composer
cd [project-dir]
curl -s https://getcomposer.org/installer | php
  • Install project dependencies
cd [project-dir]
php composer.phar install
  • Run php's built in webserver
cd [project-dir]/public
php -S localhost:8000

Configuration

Add your local database credentials to the configuration file located at project-dir/config/config.php. If you want you can also add an entry to your hosts file so you can access the server from e.g. http://krustykookies.local/. The hosts file is located at /etc/hosts.

Add the following row to your ~/.bashrc file to be able to run phpunit from anywhere within the project structure.

alias phpunit='$(git rev-parse --show-cdup)vendor/bin/phpunit'

Important documentation