Environment db configurable

make db configurable in three types of environments

1. development
2. test
3. production