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 git@github.com: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 --dev
orsudo php composer,phar install --dev
- Set ZF2 application environment by adding
SetEnv APPLICATION_ENV development
to 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
Vagrantfile
or leave the defaults - Run
vagrant up
from 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.