SepiaGroup/Neo4jRestNet — Issue #5: Configurating the default url
Author: promontis
Created: 2011-12-09 11:46:28+00:00
State: open

To connect to neo4j we need a db url to find the REST service. While we can provide the db url in most (overloaded) functions as a parameter, I can imagine most people never do this: it is far easier to just configure the default db url in the app config and to omit the db url parameter.

This issue is about configurating that default db url in the app config.
This within the context of debug (development) and release (production) versions.

While the current configuration is sufficient for most environments - you can create a app config for development and one for production, it is not in the cloud platform appharbor.

Appharbor differentiates between debug and release throught the use of an environment app setting (among others, but for me this is the best option). I currently hold one app config and postfix my connection strings with .{environment}. This is default set on debug and AppHarbor automatically switches this to release.

So basically I'm in need to specify which connection string key to use for the default db url. I've seen this feature in other frameworks aswell. Currently the key is hardcoded at various places, and what I would like to suggest is to centralize this in a Configuration class which is injected using a DI container.

What do you think?