etherpad-lite/bin/migrateDirtyDBtoMySQL.js
Marcel Klehr b057759eae Fix #1142 error in bin/migrateDirtyDBtoMySQL.js
npm must be npm.load'ed before using it
2012-11-09 22:06:26 +01:00

17 lines
431 B
JavaScript

require("ep_etherpad-lite/node_modules/npm").load({}, function(er,npm) {
process.chdir(npm.root+'/..')
var dirty = require("ep_etherpad-lite/node_modules/ueberDB/node_modules/dirty")('var/dirty.db');
var db = require("ep_etherpad-lite/node/db/DB");
db.init(function() {
db = db.db;
dirty.on("load", function() {
dirty.forEach(function(key, value) {
db.set(key, value);
});
});
});
});