Use MongoDB environment variable

Also moved db config to config.js and added it to linting.