@@ -12,8 +12,9 @@ var io = require('socket.io')(appServer);
12
12
13
13
var port = process . env . PORT || 3000 ;
14
14
var dbName = process . env . BOT || "testbot" ;
15
+ var dbHost = process . env . DBHOST || "localhost" ;
15
16
16
- var config = { db : 'mongodb://localhost /' + dbName } ;
17
+ var config = { db : 'mongodb://' + dbHost + ' /' + dbName } ;
17
18
var options = { server : { socketOptions : { keepAlive : 1 } } } ;
18
19
var factSystem = sfact . create ( dbName ) ;
19
20
@@ -40,7 +41,7 @@ conn.once('open', function() {
40
41
var models = require ( 'superscript/lib/topics/index' ) ( mongoose , factSystem ) ;
41
42
42
43
require ( './config/express' ) ( app ) ;
43
-
44
+
44
45
new ss ( botOptions , function ( err , botInstance ) {
45
46
require ( './config/chat' ) ( io , botInstance , models ) ;
46
47
@@ -72,7 +73,7 @@ conn.once('open', function() {
72
73
73
74
app . post ( '/knowledge/bot' , knowledgeRoute . addBot ) ;
74
75
app . post ( '/knowledge/world' , knowledgeRoute . addWorld ) ;
75
-
76
+
76
77
app . delete ( '/knowledge/user' , knowledgeRoute . userDelete ) ;
77
78
app . delete ( '/knowledge/bot' , knowledgeRoute . botDelete ) ;
78
79
app . delete ( '/knowledge/world' , knowledgeRoute . worldDelete ) ;
@@ -88,7 +89,7 @@ conn.once('open', function() {
88
89
app . get ( '/replies' , repliesRoute . index ) ;
89
90
app . get ( '/replies/:id' , repliesRoute . show ) ;
90
91
app . delete ( '/replies/:id' , repliesRoute . delete ) ;
91
-
92
+
92
93
app . post ( '/gambits/quick' , gambitRoute . quickPost ) ;
93
94
app . post ( '/gambits/:id' , gambitRoute . post ) ;
94
95
@@ -122,4 +123,4 @@ conn.once('open', function() {
122
123
} ) ;
123
124
} ) ;
124
125
125
- module . exports = app ;
126
+ module . exports = app ;
0 commit comments