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