File: models/marioChar.js
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const MarioCharSchema = new Schema({
name: String,
weight: Number
})
const MarioChar = mongoose.model('mariochar', MarioCharSchema)
module.exports = MarioChar;
// Now we can do the following
// var myChar = new MarioChar({ name: "Rayan", weight: 100 });
Top comments (0)