refactor app.js and config.js to use correct ports and databases in all envs