reverts the changes I didn't like/understand
parent
7cf1a50fff
commit
822d854882
|
@ -28,7 +28,7 @@ var db = new ueberDB.database(settings.dbType, settings.dbSettings);
|
||||||
/**
|
/**
|
||||||
* The UeberDB Object that provides the database functions
|
* 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
|
* Initalizes the database with the settings provided by the settings module
|
||||||
|
@ -49,6 +49,7 @@ exports.init = function(callback)
|
||||||
//everything ok
|
//everything ok
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
exports.db = db;
|
||||||
callback(null);
|
callback(null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -31,8 +31,6 @@ var async = require('async');
|
||||||
var express = require('express');
|
var express = require('express');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var minify = require('./minify');
|
var minify = require('./minify');
|
||||||
var exporthtml = require("./exporters/exporthtml");
|
|
||||||
var padManager = require("./PadManager");
|
|
||||||
|
|
||||||
//try to get the git version
|
//try to get the git version
|
||||||
var version = "";
|
var version = "";
|
||||||
|
@ -109,14 +107,6 @@ async.waterfall([
|
||||||
res.sendfile(filePath, { maxAge: exports.maxAge });
|
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
|
//serve timeslider.html under /p/$padname/timeslider
|
||||||
app.get('/p/:pad/timeslider', function(req, res, next)
|
app.get('/p/:pad/timeslider', function(req, res, next)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue