v1.18.x
Julian Lam 12 years ago
parent 6da36bb859
commit f894eae34f

@ -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]));
}

@ -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';

Loading…
Cancel
Save