Skip to content

Instantly share code, notes, and snippets.

@julianlam
Created March 8, 2016 16:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save julianlam/6f439172a39f79ad5507 to your computer and use it in GitHub Desktop.
Save julianlam/6f439172a39f79ad5507 to your computer and use it in GitHub Desktop.
One-off db diving script
'use strict';
/*globals require, console, process */
var nconf = require('nconf');
var async = require('async');
var fs = require('fs');
nconf.file({
file: 'config.json'
});
var db = require('./src/database');
db.init(function(err) {
if (err) {
console.log("NodeBB could not connect to your Mongo database. Mongo returned the following error: " + err.message);
process.exit();
}
// Do stuff here
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment