This is a simple "Hello World" example of using ArangoDB in Symfony2.
This demo uses
- Symfony 2.4
- ArangoDB 2
- MopArangoDbBundle
- arangodb-php
The "app" demonstrates how to create, update and delete documents using the simple query API. Additionally it has an example for ArangoDB's query language AQL (search for topics in the movies database).
First install ArangoDB and make sure it is running. You'll find plenty of information how to do this in the ArangoDB manual.
The installation of the demo app is pretty straight forward (the usual way for Symfony 2 apps which use composer).
- set up a virtual domain Here is an example for a vhost config for Apache)
- clone the repository
- cd symfony-arangodb
- get composer
- Run "php composer.phar install" - this will fetch all required 3rd party libs from the internet and set everything up
Finally open the app in your browser. Let's say your virtual domain is called hellosymfony.dev, the app will pop up using http://hellosymfony.dev/ or hellosymfony.dev/app_dev.php to run it in dev mode.
There are settings for arangodb in app/config_dev.yml - look for "mop_arango_db". Check out the documentation for MopArangoDbBundle for details on this (note: this bundle also offers integration with the FOS UserBundle).
You'll find all the demo code in src/Triagens/ArangodbBundle/Controller/DefaultController.php