Skip to content

Instantly share code, notes, and snippets.

@eliperelman

eliperelman/cli Secret

Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eliperelman/c07a5fe077094e7c4c87 to your computer and use it in GitHub Desktop.
Save eliperelman/c07a5fe077094e7c4c87 to your computer and use it in GitHub Desktop.
$ node import.js
var env = require('gaia-raptor/node_modules/dotenv');
var reportToDb = require('gaia-raptor/lib/reporter/database');
var fs = require('fs');
env.load();
fs.readFile('raptor.log', { encoding: 'utf8' }, function(err, content) {
var data = content
.split('\n')
.map(JSON.parse);
reportToDb(data);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment