Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var mongoose = require('mongoose');
- mongoose.connect('mongodb://localhost:27017/iplayyoulisten');
- var models = {};
- models.User = mongoose.model('User', {
- name: String,
- email: String,
- password: String,
- registered: Number
- });
- models.Artist = mongoose.model('Artist', {
- name: String,
- image: String,
- cover: String
- });
- models.Album = mongoose.model('Album', {
- title: String,
- artwork: String,
- artistId: String,
- genres: Array,
- tracks: [{
- title: String,
- artist: String,
- src: String
- }]
- });
- module.exports = models;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement