Created
March 8, 2016 16:32
-
-
Save julianlam/6f439172a39f79ad5507 to your computer and use it in GitHub Desktop.
One-off db diving script
This file contains 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
'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