-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmusical-album2.js
73 lines (65 loc) · 1.29 KB
/
musical-album2.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
var mongoose = require('mongoose');
mongoose.connect('localhost', 'test');
var PlaylistSchema = mongoose.Schema({
playlist_id: {type: Number, required: true},
info: [{
song_name: String,
artist: String,
album_name: String
}]
});
var Song = mongoose.model('Song', PlaylistSchema);
var one = new Song({
playlist_id: 1,
info: [{
song_name: 'All Star',
artist: 'Smash Mouth',
album_name: 'All Star Smash Mouth'
}]
});
one.save();
var one = new Song({
playlist_id: 1,
info: [{
song_name: 'Glow',
artist: 'Alien Aunt Farm',
album_name: 'The Best Of Alien Ant Farm Twentyth Century Masters'
}]
});
one.save();
var one = new Song({
playlist_id: 1,
info: [{
song_name: 'Across the Universe',
artist: 'Fiona Apple',
album_name: 'Pleasantville'
}]
});
one.save();
var one = new Song({
playlist_id: 2,
info: [{
song_name: 'Bridge Burning',
artist: 'Foo Fighters',
album_name: 'Wasting Light'
}]
});
one.save();
var one = new Song({
playlist_id: 2,
info: [{
song_name: 'Howlin for you',
artist: 'Black Keys',
album_name: 'Brothers'
}]
});
one.save();
var one = new Song({
playlist_id: 2,
info: [{
song_name: 'The Pretender',
artist: 'Foo Fighters',
album_name: 'Patience and Grace'
}]
});
one.save();