Compare commits

...

1 Commits

Author SHA1 Message Date
Artem Anufrij
9d0272351d wip
All checks were successful
continuous-integration/drone/push Build is passing
2023-09-28 13:00:46 +02:00
4 changed files with 259 additions and 85 deletions

View File

@ -10,12 +10,12 @@
"http://localhost"
],
"database": {
"host": "database",
"host": "localhost",
"port": 27017,
"name": "webplay"
},
"redis": {
"host": "redis",
"host": "localhost",
"port": 6379
},
"album_cover_files": [

331
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@
"fluent-ffmpeg": "^2.1.2",
"jsonwebtoken": "^9.0.0",
"mime-types": "^2.1.35",
"mongodb": "^4.14.0",
"mongodb": "^6.1.0",
"music-metadata": "^7.13.3",
"node-fdkaac": "^1.4.1",
"node-id3": "^0.2.6",

View File

@ -1,4 +1,4 @@
const { MongoClient } = require('mongodb');
const MongoClient = require('mongodb').MongoClient;
const server = require("../../server");
const config = server.config;
@ -14,7 +14,10 @@ exports.connect = async function () {
else {
try {
console.log("DB CONNECTING:" + config.database.host + ":" + config.database.port)
const client = await MongoClient.connect(url);
const client = await MongoClient.connect(url, (err, db)=> {
console.log("DB Connected")
}
);
dbo = client.db(database);
return dbo;
} catch (error) {