Simple contact manager responsive web app with RESTful API.
- Try it out: http://mb.fullbusiness.com/cc/public/index.htm
- Swagger REST API documentation: http://mb.fullbusiness.com/cc/public/api-docs/contact
This repo also includes a Vagrant chef cookbook to get your development environment up and runing in no time.
- Clone the repo:
git clone [email protected]:mbman/ccontacts.git - Initialize git submodules:
git submodule update --init --recursive - Install Composer: http://getcomposer.org/download/ (skip if using provided Vagrant server)
- Install dependencies (ZF2, Doctrine & PHPunit):
sudo composer install --devorsudo php composer,phar install --dev - Set ZF2 application environment by adding
SetEnv APPLICATION_ENV developmentto Apache'shttpd.conf(skip if using the provided Vagrant server)
Setup DoctrineORM with MySQL adapter, from project root directory:
- Validate database schema:
./vendor/bin/doctrine-module orm:validate-schema - Create database:
./vendor/bin/doctrine-module orm:schema-tool:create
Update database: ./vendor/bin/doctrine-module orm:schema-tool:update --force
If you don't have a local LAMP server running PHP 5.4 or higher, you can use the provider Vagrant development server cookbook.
- Modify the
Vagrantfileor leave the defaults - Run
vagrant upfrom the project root directory - SSH into your server:
vagrant ssh - Go to web root:
cd /var/www/ - Remove Apache's default html:
sudo rm index.html - Install dependencies (ZF2, Doctrine & PHPunit):
sudo composer install --dev
The app is now running on: 192.168.56.101 using ccontacts.dev wildcard alias with ssl support
More info on LAMPapp Vagrant cookbook
PHPunit is included using Composer.
Run ../../../vendor/bin/phpunit from "module/[Module name]/test/" directory.