Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // defining a mongoose schema
- // including the module
- var mongoose = require('mongoose');
- // declare schema object.
- var Schema = mongoose.Schema;
- var blogSchema = new Schema({
- title : {type:String,default:'',required:true },
- subTitle : {type:String,default:''},
- blogBody : {type:String,default:''},
- tags : [],// name of tags in array
- created : {type:Date},
- lastModified : {type:Date},
- authorInfo : {} // information of author in form of obje-ct
- });
- mongoose.model('Blog',blogSchema);
- userName : {type:String,default:''} ,
- passWord : {type:String,default:''}
- like
- // defining a mongoose schema
- // including the module
- var mongoose = require('mongoose');
- // declare schema object.
- var Schema = mongoose.Schema;
- var blogSchema = new Schema({
- title : {type:String,default:'',required:true},
- subTitle : {type:String,default:''},
- blogBody : {type:String,default:''},
- tags : [],// name of tags in array
- created : {type:Date},
- lastModified : {type:Date},
- authorInfo : {} // information of author in form of obje-ct
- userName : {type:String,default:''} ,----------------------------------here
- passWord : {type:String,default:''} ----------------------------------here
- });
- C:leveltwoassigntwoblogModel.js:19
- userName : {type:String,default:''}
- ^^^^^^^^
- SyntaxError: Unexpected identifier
- at createScript (vm.js:56:10)
- at Object.runInThisContext (vm.js:97:10)
- at Module._compile (module.js:542:28)
- because of the above problem i am unable to create a new entries in the
- project and even my postman is also not responding.
- please reply if anyone knows ..... thank you.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement