mirror of https://github.com/Chocobozzz/PeerTube
Server: fix db clean for clean script
parent
8eb7d0fa09
commit
c92372d0aa
|
@ -4,7 +4,7 @@ mongoose.Promise = global.Promise
|
||||||
|
|
||||||
const constants = require('../../../server/initializers/constants')
|
const constants = require('../../../server/initializers/constants')
|
||||||
|
|
||||||
const mongodbUrl = 'mongodb://' + constants.CONFIG.DATABASE.HOST + ':' + constants.CONFIG.DATABASE.PORT + '/' + constants.CONFIG.DATABASE.DBNAME
|
const mongodbUrl = 'mongodb://' + constants.CONFIG.DATABASE.HOSTNAME + ':' + constants.CONFIG.DATABASE.PORT + '/' + constants.CONFIG.DATABASE.DBNAME
|
||||||
mongoose.connect(mongodbUrl, function () {
|
mongoose.connect(mongodbUrl, function () {
|
||||||
console.info('Deleting MongoDB %s database.', constants.CONFIG.DATABASE.DBNAME)
|
console.info('Deleting MongoDB %s database.', constants.CONFIG.DATABASE.DBNAME)
|
||||||
mongoose.connection.dropDatabase(function () {
|
mongoose.connection.dropDatabase(function () {
|
||||||
|
|
Loading…
Reference in New Issue