Skip to content

Instantly share code, notes, and snippets.

Created Dec 4, 2019
What would you like to do?
node-redis-mongo - Moongose model that represents a book.
const mongoose = require("mongoose");
const { Schema } = mongoose;
const bookSchema = new Schema({
title: String,
content: String,
createdAt: { type: Date, default: },
author: String
mongoose.model("Book", bookSchema);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment