added mongose and express, modified server, for testing purpose added user controller, model and routes
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
var mongoose = require('mongoose');
|
||||
var Schema = mongoose.Schema;
|
||||
|
||||
var UserSchema = new Schema({
|
||||
// TODO modify later, just for testing
|
||||
name: {
|
||||
type: String,
|
||||
required: 'Name'
|
||||
},
|
||||
Created_date: {
|
||||
type: Date,
|
||||
default: Date.now
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = mongoose.model('User', UserSchema);
|
||||
|
||||
Reference in New Issue
Block a user