added mongose and express, modified server, for testing purpose added user controller, model and routes

This commit is contained in:
Amra Šabić
2018-02-17 11:44:35 +01:00
parent e51d046374
commit fda840d119
6 changed files with 231 additions and 4 deletions

View File

@@ -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);