Database Reference
In-Depth Information
Slim Application Configuration
Before diving into the code examples, you need to update the configuration for the Slim application. In Eclipse (or the
IDE you are using), open the file {PROJECTROOT}/app/service/AppConfig.php and edit the GraphStory connection
string information. If you are using a free account from graphstory.com, you will change the username, password and
URL in Listing 8-14 with the one provided in your graph console on graphstory.com.
Listing 8-14. Database Connection Settings for a Remote Service such as Graph Story
$neo4jClient = new Everyman\Neo4j\Client('someurl.graphstory.com', 7473);
$neo4jClient->getTransport()->useHttps()->setAuth('username', 'password');
If you have installed a local Neo4j server instance, you can modify the configuration to use the local address and
port that you specified during the installation, similar to the example shown in Listing 8-15.
Listing 8-15. Database Connection Settings for Local Enviroment
$neo4jClient = new Everyman\Neo4j\Client('localhost', 7474);
Once the environment is properly configured and started, you can open a browser to the url, http://
practicalneo4j-PHP , and you should see a page like the one shown in Figure 8-6 .
Figure 8-6. The PHP sample application home page
 
Search WWH ::




Custom Search