Implementing Mongoose Models with Next.js in TypeScript
Non Next.js application
In a typical Express JS project the below code would have sufficed
// test.model.ts
import { model, Model, Schema } from "mongoose";
import createModel from "../createModel";
interface ITest {
first_name: string;
las...
blog.adwinang.dev3 min read
michael matta
hi, how to trigger pre('save') middleware?