I have a basic web app that I can add a user, update a user, find a user and delete a user. I'm doing this on Postman using Post, Get, and Delete.
I'm trying to add a field to my MongoDB (through Mongoose) that will automatically insert the current date when I create a new user. I've tried a few different methods from questions I've found on this site, but none seem to be working. This is the schema for the db. Thanks
var mongoose = require('mongoose');
var userSchema = mongoose.Schema({
name: String,
times:{
description:String
}
});
module.exports = mongoose.model('User', userSchema);