awesome-compose/react-express-mongodb/backend/models/todos/todo.model.js
Jérémie Drouet 9696296945 react-express-mongodb: rename server to backend
The goal here is to keep the same structure than the other examples.
Also, considering that it has a "frontend" folder, the equivalent for
the server should be "backend".

Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
2020-05-12 15:24:00 +02:00

15 lines
222 B
JavaScript

/**
* Created by Syed Afzal
*/
const mongoose = require('mongoose');
var Todo = mongoose.model('Todo', {
text : {
type: String,
trim: true,
required: true
}
});
module.exports = {Todo};