Fixed a typo
Update npm and bower packages to latest
Refactored database configuration into a function for benefit of testing