From f894eae34f08658d89b12894602013062a8aab98 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 22 Apr 2013 15:03:07 -0400 Subject: [PATCH 1/3] tweaks --- src/templates.js | 2 -- src/webserver.js | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/templates.js b/src/templates.js index 1cb31a6e5d..a6fb101ffc 100644 --- a/src/templates.js +++ b/src/templates.js @@ -7,10 +7,8 @@ var fs = require('fs'); function loadTemplates(templatesToLoad) { for (var t in templatesToLoad) { (function(template) { - console.log(global.configuration.ROOT_DIRECTORY); fs.readFile(global.configuration.ROOT_DIRECTORY + '/public/templates/' + template + '.tpl', function(err, html) { global.templates[template] = html; - console.log(html); }); }(templatesToLoad[t])); } diff --git a/src/webserver.js b/src/webserver.js index 9c1c3a0c37..b7faee3544 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -5,6 +5,7 @@ var express = require('express'), (function(app) { var templates = global.templates; + global.app = app; app.get('/test', function(req, res) { var body = 'testing'; From d035307d8b97939f3e8c29964d7eb1d099919f69 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 22 Apr 2013 15:17:41 -0400 Subject: [PATCH 2/3] changing the way the express app is instantiated --- public/templates/header.tpl | 2 +- src/webserver.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/templates/header.tpl b/public/templates/header.tpl index 2dcfd5f10f..2bc5e24eb3 100644 --- a/public/templates/header.tpl +++ b/public/templates/header.tpl @@ -113,7 +113,7 @@ }