var path = require('path');
var fs = require('fs');
var extend = require('extend');

var params = {};
if (fs.existsSync(path.join(__dirname, 'params.json'))) {
    params = require('./params.json');
}

module.exports = extend(
    {
        port: 3000,

        dbConnectionString: 'mongodb://localhost:27017/knowledgebase',

        fileLinkPrefix: "/server/",
        uploadDirPerm: 'uploads/articles',
        uploadDirTmp: 'uploads/articles_tmp',
        uploadDirOld: 'uploads/articles_old',

        articleContentFileName: 'article.html',

        oldTemporaryArticlesDeleteJobOptions: {
            intervalTimeInHours: 24,
            maxAgeInHours: 24
        },

        postBodyValidationValues: {
            maxArticleTitleLength: 1000,
            maxArticleAuthorEmailLength: 255,
            maxArticleAuthorNameLength: 1000,
        }
    }, params);
@@ -279,34 +279,139 @@
 ng: 
-'mongodb://localhost:27017
+process.env.MONGODB %7C%7C 'mongodb://' + (process.env.DATABASE_ADDR %7C%7C 'localhost') + ':' + (process.env.DATABASE_PORT %7C%7C '27017') + '
 /kno
@@ -966,8 +966,9 @@
 params);
+%0A

Add database env parameter