From 822d854882a5f05284a240bd64cb3b52297f432f Mon Sep 17 00:00:00 2001 From: Peter 'Pita' Martischka Date: Thu, 7 Jul 2011 18:09:08 +0100 Subject: [PATCH] reverts the changes I didn't like/understand --- node/db.js | 3 ++- node/server.js | 10 ---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/node/db.js b/node/db.js index 67d115e6..c586e1c4 100644 --- a/node/db.js +++ b/node/db.js @@ -28,7 +28,7 @@ var db = new ueberDB.database(settings.dbType, settings.dbSettings); /** * The UeberDB Object that provides the database functions */ -exports.db = db; +exports.db = null; /** * Initalizes the database with the settings provided by the settings module @@ -49,6 +49,7 @@ exports.init = function(callback) //everything ok else { + exports.db = db; callback(null); } }); diff --git a/node/server.js b/node/server.js index 4009e9c2..dd85cfae 100644 --- a/node/server.js +++ b/node/server.js @@ -31,8 +31,6 @@ var async = require('async'); var express = require('express'); var path = require('path'); var minify = require('./minify'); -var exporthtml = require("./exporters/exporthtml"); -var padManager = require("./PadManager"); //try to get the git version var version = ""; @@ -109,14 +107,6 @@ async.waterfall([ res.sendfile(filePath, { maxAge: exports.maxAge }); }); - app.get("/p/:pad/html", function (req, res) { - padManager.getPad(req.params.pad, function (err, pad) { - exporthtml.getPadHTMLDocument(pad, null, false, function (err, html) { - res.send(html); - }); - }); - }); - //serve timeslider.html under /p/$padname/timeslider app.get('/p/:pad/timeslider', function(req, res, next) {