From 9917394359fa1d5687594384b1e0b74cc0b21dcd Mon Sep 17 00:00:00 2001 From: Lloyd Hilaiel <lloyd@hilaiel.com> Date: Fri, 5 Aug 2011 13:13:29 -0600 Subject: [PATCH] place env specific database configuration in configuration.js --- browserid/app.js | 2 +- libs/configuration.js | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/browserid/app.js b/browserid/app.js index f95f06a4b..7b9475279 100644 --- a/browserid/app.js +++ b/browserid/app.js @@ -21,7 +21,7 @@ substitution = require('../libs/substitute.js'); logging = require("../libs/logging.js"); // open the databse -db.open(); +db.open(configuration.get('database')); // looks unused, see run.js // const STATIC_DIR = path.join(path.dirname(__dirname), "static"); diff --git a/libs/configuration.js b/libs/configuration.js index 2690dc1f2..4ad59da7f 100644 --- a/libs/configuration.js +++ b/libs/configuration.js @@ -26,28 +26,32 @@ const g_configs = { port: '443', scheme: 'https', use_minified_resources: true, - log_path: '/home/browserid/var/' + log_path: '/home/browserid/var/', + database: { driver: "mysql" } }, development: { hostname: 'dev.diresworb.org', port: '443', scheme: 'https', use_minified_resources: true, - log_path: '/home/browserid/var/' + log_path: '/home/browserid/var/', + database: { driver: "mysql" } }, beta: { hostname: 'diresworb.org', port: '443', scheme: 'https', use_minified_resources: true, - log_path: '/home/browserid/var/' + log_path: '/home/browserid/var/', + database: { driver: "mysql" } }, local: { hostname: '127.0.0.1', port: '10002', scheme: 'http', use_minified_resources: false, - log_path: './' + log_path: './', + database: { driver: "json" } } }; -- GitLab