Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

using mongoose with node js

// Create an instance of model SomeModel
var awesome_instance = new SomeModel({ name: 'awesome' });

// Save the new model instance, passing a callback
awesome_instance.save(function (err) {
  if (err) return handleError(err);
  // saved!
});
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #mongoose #node #js
ADD COMMENT
Topic
Name
8+1 =