Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

db singleton

  • Loading branch information...
commit ad5ec9f6a9c67390e2fd08832a84eed7565e619b 1 parent def627d
zackster authored
Showing with 20 additions and 0 deletions.
  1. +20 −0 database/singleton.js
20 database/singleton.js
View
@@ -0,0 +1,20 @@
+(function() {
+
+ var config = require('.././config');
+ var mongoose = require("mongoose");
+
+ mongoose.connect(config.mongodb.uri, function(err) {
+ if(err) {
+ throw err;
+ }
+
+ console.log('Successfully Connected To Mongoose!');
+ console.log('(' + config.mongodb.uri + ')');
+
+
+ });
+
+
+
+
+})();
Please sign in to comment.
Something went wrong with that request. Please try again.