Advertisement
Guest User

Untitled

a guest
Mar 24th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. var mongoose = require('mongoose');
  2. var LyricSchema = mongoose.Schema({
  3. artists:
  4. { id: String,
  5. name: String,
  6. images: String
  7. },
  8. albums:
  9. [ { album: [{
  10. id:String,
  11. name:String,
  12. image:String
  13. }],
  14. tracks: [{
  15. name:String
  16. }] }]
  17. });
  18.  
  19.  
  20. var Lyric = module.exports = mongoose.model('lyric', LyricSchema);
  21.  
  22. module.exports.save = function(json, callback){
  23. Lyric.create(json, callback);
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement