Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports = {
- startup: function(dbToUse) {
- mongoose.connect(dbToUse);
- mongoose.connection.on('open', function() {
- console.log("MongoDB connection established.");
- });
- },
- saveUser: function(userInfo, callback) {
- var newUser = new User({
- displayName: userInfo.displayName
- , email: userInfo.email
- , password: userInfo.password
- });
- }
- // app.js
- db = new DB.startup(conn);
- db.saveUser()
- TypeError: Object [object Object] has no method 'saveUser'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement