Update server-db.js

Common place to process errors. Add config parameter for termination process optional (breakOnError).