test script javascript

  • a test script for javascript
const mongoose = require("mongoose"); //Define a schema
const Schema = mongoose.Schema;
const MovieSchema = new Schema({
  name: {
    type: String,
    trim: true,
    required: true
  },
  released_on: {
    type: Date,
    trim: true,
    required: true
  }
});
module.exports = mongoose.model("Movie", MovieSchema);

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.