Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. // defining a mongoose schema
  2. // including the module
  3. var mongoose = require('mongoose');
  4. // declare schema object.
  5. var Schema = mongoose.Schema;
  6.  
  7. var blogSchema = new Schema({
  8.  
  9. title : {type:String,default:'',required:true },
  10. subTitle : {type:String,default:''},
  11. blogBody : {type:String,default:''},
  12. tags : [],// name of tags in array
  13. created : {type:Date},
  14. lastModified : {type:Date},
  15. authorInfo : {} // information of author in form of obje-ct
  16. });
  17.  
  18. mongoose.model('Blog',blogSchema);
  19.  
  20. userName : {type:String,default:''} ,
  21. passWord : {type:String,default:''}
  22.  
  23. like
  24.  
  25. // defining a mongoose schema
  26. // including the module
  27. var mongoose = require('mongoose');
  28. // declare schema object.
  29. var Schema = mongoose.Schema;
  30.  
  31. var blogSchema = new Schema({
  32.  
  33. title : {type:String,default:'',required:true},
  34. subTitle : {type:String,default:''},
  35. blogBody : {type:String,default:''},
  36. tags : [],// name of tags in array
  37. created : {type:Date},
  38. lastModified : {type:Date},
  39. authorInfo : {} // information of author in form of obje-ct
  40. userName : {type:String,default:''} ,----------------------------------here
  41. passWord : {type:String,default:''} ----------------------------------here
  42. });
  43.  
  44. C:leveltwoassigntwoblogModel.js:19
  45. userName : {type:String,default:''}
  46. ^^^^^^^^
  47. SyntaxError: Unexpected identifier
  48. at createScript (vm.js:56:10)
  49. at Object.runInThisContext (vm.js:97:10)
  50. at Module._compile (module.js:542:28)
  51.  
  52. because of the above problem i am unable to create a new entries in the
  53. project and even my postman is also not responding.
  54. please reply if anyone knows ..... thank you.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement