Change default database name + cleaner code
This commit is contained in:
parent
4abbcc690b
commit
93b7593151
|
@ -7,14 +7,14 @@ module.exports = {
|
||||||
if (mconn !== null)
|
if (mconn !== null)
|
||||||
return mconn
|
return mconn
|
||||||
const dbhost = process.env.DB_HOST || 'db'
|
const dbhost = process.env.DB_HOST || 'db'
|
||||||
mconn = new MongoClient('mongodb://'+dbhost+':27017', {
|
mconn = new MongoClient(`mongodb://${dbhost}:27017`, {
|
||||||
useUnifiedTopology: true,
|
useUnifiedTopology: true,
|
||||||
useNewUrlParser: true
|
useNewUrlParser: true
|
||||||
})
|
})
|
||||||
return mconn
|
return mconn
|
||||||
},
|
},
|
||||||
get: () => {
|
get: () => {
|
||||||
mdb = mconn.db(process.env.DB_NAME || 'activitypub')
|
mdb = mconn.db(process.env.DB_NAME || 'fedilove')
|
||||||
return mdb
|
return mdb
|
||||||
},
|
},
|
||||||
table: {
|
table: {
|
||||||
|
|
Loading…
Reference in New Issue