File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 18
18
"test-reload" : " nodemon --exec mocha"
19
19
},
20
20
"dependencies" : {
21
+ "cron" : " ^1.1.0" ,
21
22
"koa" : " ^1.2.1" ,
22
23
"koa-bodyparser" : " ^2.2.0" ,
23
- "cron " : " ^1.1.0 " ,
24
+ "mongoose " : " ^4.5.7 " ,
24
25
"slackbots" : " ^0.5.1"
25
26
},
26
27
"devDependencies" : {
Original file line number Diff line number Diff line change
1
+ 'use strict'
2
+
3
+ const mongoose = require ( 'mongoose' )
4
+
5
+ const WinSchema = mongoose . Schema ( {
6
+ author : String ,
7
+ channel : String ,
8
+ win : String
9
+ } )
10
+
11
+ module . exports = mongoose . model ( 'Win' , WinSchema )
Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ const TwigBot = require('./TwigBot')
4
4
const MessageScheduler = require ( './MessageScheduler' )
5
5
const koa = require ( 'koa' )
6
6
const bodyParser = require ( 'koa-bodyparser' )
7
+ const mongoose = require ( 'mongoose' )
8
+
9
+ mongoose . Promise = global . Promise
10
+ mongoose . connect ( process . env . MONGO_URI )
7
11
8
12
const app = koa ( )
9
13
const port = process . env . PORT || 3000
You can’t perform that action at this time.
0 commit comments