Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

create new record mongoose

   // Create new user.
   let newUser = {
       username: req.body.username,
       password: passwordHashed,
       salt: salt,
       authorisationKey: authCode
   };

   // From require('UserModel');
   return ModelUser.create(newUser);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #record #mongoose
ADD COMMENT
Topic
Name
3+5 =