Skip to content

Instantly share code, notes, and snippets.

@unicodeveloper
Created September 12, 2016 16:50
Show Gist options
  • Save unicodeveloper/1c92245111fe681643dee81b8e087504 to your computer and use it in GitHub Desktop.
Save unicodeveloper/1c92245111fe681643dee81b8e087504 to your computer and use it in GitHub Desktop.
Cloudinary Blog Post - Part 1
var mongoose = require('mongoose'),
videoSchema = mongoose.Schema({
title: { type: String },
public_id: { type: String, required: true },
description: { type: String, required: true },
url: { type: String, required: true },
duration: { type: Number, required: true },
format: { type: String, required: true },
time_uploaded: { type: Date, default: Date.now }
});
module.exports = mongoose.model('Video', videoSchema, 'videos');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment