Skip to content
Snippets Groups Projects
Commit 19dc3b06 authored by Devin Alvaro's avatar Devin Alvaro
Browse files

Add Mongoose wrapper class ChatData

parent 2dc65db2
Branches
No related merge requests found
class ChatData {
constructor () {
this.mongoose = require('mongoose')
this.mongoose.connect('mongodb://localhost/wbd3_chat')
this.chatSchema = new this.mongoose.Schema({
participant_ids: [Number],
chats: [{
owner_id: Number,
content: String
}]
})
this.ChatModel = this.mongoose.model('Chat', this.chatSchema)
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment