UNPKG

secure-mern

Version:

A lightweight yet powerful npm package to enhance security in MERN stack applications. Built with enterprise-grade architecture in mind, secure-mern helps you integrate essential security features with minimal configuration.

9 lines (6 loc) 259 B
const mongoose = require("mongoose"); const roleSchema = new mongoose.Schema({ name: { type: String, required: true, unique: true }, permissions: [{ type: String }], }, { timestamps: true }); module.exports = mongoose.model("Role", roleSchema);