Skip to content

Instantly share code, notes, and snippets.

@0x46616c6b
Created September 9, 2013 08:45
Show Gist options
  • Save 0x46616c6b/6493074 to your computer and use it in GitHub Desktop.
Save 0x46616c6b/6493074 to your computer and use it in GitHub Desktop.
require("ep_etherpad-lite/node_modules/npm").load({}, function(er,npm) {
process.chdir(npm.root+'/..');
var settings = require("ep_etherpad-lite/node/utils/Settings");
var sqlite3 = require('sqlite3');
var sqliteDb = new sqlite3.Database('var/sqlite.db');
var db = require("ep_etherpad-lite/node/db/DB");
db.init(function() {
db = db.db;
sqliteDb.each("SELECT * FROM store", function(err, row) {
db.set(row.key,row.value);
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment