You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
346 B
JavaScript

const mongoose = require("mongoose");
const taskSchema = new mongoose.Schema({
    name: String,
    status: {
        type: String,
        default: "pending"
    }
});
module.exports = mongoose.model("task", taskSchema);
// "module.exports" is a way for Node JS to treat this value as a "package" that can be used by other file