From effa17dee47a9aa837ef7253cc72d13ecbc61660 Mon Sep 17 00:00:00 2001 From: Guillaume Turri Date: Sat, 1 Mar 2014 12:00:45 +0100 Subject: [PATCH] Don't hard code Fabelier's name --- config.js.template | 12 ++++++++++++ index.js | 2 +- monitor.html | 4 ++-- ring.html | 4 ++-- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/config.js.template b/config.js.template index 5a67afe..7f46ef7 100644 --- a/config.js.template +++ b/config.js.template @@ -1,14 +1,26 @@ var config = {} +//The name of your place / your group +//Will be display on the web pages +config.place_name = "Local user group"; + +//On which port Node will listen config.node_port = 8081; + +//Url on which visitor are supposed to ring (don't specify a port here) config.url = "http://localhost"; + +//Logo which will be displayed on the web pages config.logo_url = "http://fabelier.org/f/Sticker0.png"; +//Should the server be talkative on the console config.verbose = false; +//Potential reverse proxy parameters config.reverse_proxy = false; config.reverse_proxy_port = 80; +//Should only visitors with the password be able to ring config.use_password = false; config.password = 123456; diff --git a/index.js b/index.js index 5ec9ba9..29535ef 100644 --- a/index.js +++ b/index.js @@ -58,7 +58,7 @@ function sendTemplatedFile(req, res, filename, optionalJson){ fs.readFile(filename, function(err, data){ res.set('Content-Type', 'text/html'); if (err) res.send(err); - res.send(mustache.render(data.toString(), mergeJSON({url: url, logo_url: config.logo_url, password: config.use_password}, optionalJson))); + res.send(mustache.render(data.toString(), mergeJSON({url: url, logo_url: config.logo_url, password: config.use_password, config.place_name: config.place_name}, optionalJson))); }); } diff --git a/monitor.html b/monitor.html index f08db30..ef8cfec 100644 --- a/monitor.html +++ b/monitor.html @@ -1,12 +1,12 @@ -Fabelier Doorbell +{{place_name}} Doorbell -

Fabelier door bell Monitor

+

{{place_name}} door bell Monitor

diff --git a/ring.html b/ring.html index c45d7a9..e6d2998 100644 --- a/ring.html +++ b/ring.html @@ -1,7 +1,7 @@ -Fabelier Doorbell +{{place_name}} Doorbell @@ -9,7 +9,7 @@ logo
-

Fabelier door bell

+

{{plac_name}} door bell

Please, ring here ...and wait, please :)


{{#password}}