@@ -6,7 +6,8 @@ var collections = {
Fortune: null
};
MongoClient.connect('mongodb://127.0.0.1/hello_world?maxPoolSize=5', function (err, db) {
- if (err) { return process.exit(1) }
+ // do nothing if there is err connecting to db
+
collections.World = db.collection('world');
collections.Fortune = db.collection('fortune');
});
@@ -8,7 +8,7 @@ var client = redis.createClient();
client.on('error', function (err) {
console.log('Redis Error: ' + err);
- process.exit(1);
+ // Do nothing further if Redis errors/is unavailable
function redisWorldId(id) {