Backend: code formatted

This commit is contained in:
2024-05-12 21:25:52 +02:00
parent fa25015472
commit bf791db47f
26 changed files with 574 additions and 469 deletions

View File

@ -1,10 +1,10 @@
const mongoose = require('mongoose');
const { MongoMemoryServer } = require('mongodb-memory-server');
const mongoose = require("mongoose");
const { MongoMemoryServer } = require("mongodb-memory-server");
let mongo: any = null;
const connectDB = async () => {
mongo = await MongoMemoryServer.create({ binary: { os: { os: 'linux', dist: 'ubuntu', release: '18.04' } } }); // TODO: check that host OS is Void Linux, else remove the argument
mongo = await MongoMemoryServer.create({ binary: { os: { os: "linux", dist: "ubuntu", release: "18.04" } } }); // TODO: check that host OS is Void Linux, else remove the argument
const uri = mongo.getUri();
await mongoose.connect(uri);
@ -27,4 +27,4 @@ const dropCollections = async () => {
}
};
export { connectDB, dropDB, dropCollections };
export { connectDB, dropDB, dropCollections };