extract database configration out of index.js