You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
paste/models/paste.js

13 lines
304 B
JavaScript

const mongoose = require('mongoose');
const shortid = require('shortid');
const paste = new mongoose.Schema({
_id: { type: String, default: shortid.generate },
paste: { type: String },
expiresAt: { type: Date, expires: 0 }
}, {
timestamps: true
});
module.exports = mongoose.model('Paste', paste);