Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mongoose

npm i mongoose // install npm package first
const mongoose = require('mongoose');
mongoose.connect('mongodb://localhost:27017/test');
// create user
const User = mongoose.model('User', { name: String });
const kitty = new User({ name: 'Zildjian' });
kitty.save().then(() => console.log('meow'));
Source by mongoosejs.com #
 
PREVIOUS NEXT
Tagged: #mongoose
ADD COMMENT
Topic
Name
8+4 =