Rewrote database config in javascript