staegi/symfony-rest-api

The "Symfony2 REST API " project


README

Total Downloads Latest Stable Version License

This is a nice start point to create an application which provides a REST interface to your database.

#Requirements

  • git
  • MySQL
  • PHP 5.4 or higher
  • Apache 2 or Nginx
  • Composer

#Installation

Create project with vendors:

curl -sS https://getcomposer.org/installer | php
composer.phar create-project staegi/symfony-rest-api
cd symfony-rest-api

Create development database:

php bin/console doctrine:database:create -e dev
php bin/console doctrine:schema:create -e dev

Load fixtures to create first client and user:

php bin/console doctrine:fixtures:load

###Preconfigured vendor modules

#Documenttation

The API documentation is shown under api.your-domain.com/doc.

#Monitoring

The monitoring is running under api.your-domain.com/monitor/

#Unit tests

Create test database:

php bin/console doctrine:database:create -e test

Run the unit tests with:

bin/phpunit

For the acceptance test you need a test database. Set test_database_name, test_database_user and test_database_password in your parameters.yml.