Skeleton MVC Crud Node Js + Express Js + MongoDB - 3ra Parte
/* begin /models/Product.js */
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ProductSchema = new Schema({
name: {type: String, required: true, max: 100},
price: {type: Number, required: true},
created_at: { type: Date, default: Date.now }
});
module.exports = mongoose.model('Product', ProductSchema);
/* end/models/Product.js */
/* begin /public/stylesheets/style.css */
body {
padding: 50px;
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
}
a {
color: #00B7FF;
}
/* end /public/stylesheets/style.css */
Comentarios
Publicar un comentario