UNPKG

create-swiftstart

Version:

Automate the setup of Vite-React & Next.js projects with a pre-designed boilerplate structure using create-swiftstart. This tool saves your time and provides a clean starting point for your React or Next.js applications.

16 lines (14 loc) 292 B
const mongoose = require("mongoose"); const Schema = mongoose.Schema; const mySchema = Schema({ createdOn: { key:{ type: "String", required: true, default: "" }, type: Date, default: Date.now, } }); module.exports = mongoose.model("myModel", mySchema);