Created
May 15, 2015 17:54
-
-
Save trevordixon/007de92cdf56329b6708 to your computer and use it in GitHub Desktop.
Convert LilyBin MongoDB dump to new DB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Promise = require('bluebird'); | |
const scores = require('./lib/db'); | |
var LineByLineReader = require('line-by-line'), | |
lr = new LineByLineReader('scores.json'); | |
lr.on('line', function(line) { | |
var data = JSON.parse(line); | |
var id = data['_id']; | |
console.log(id, data.revisions.length); | |
Promise.each(data.revisions, function(rev) { | |
return scores.save(id, rev.code, rev.version); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I am trying to disable roll in flycontrols.js. please help with my code.