Alles erst mal soweit fertig

This commit is contained in:
rxf
2023-05-03 20:24:05 +02:00
parent 7f6cfee1ff
commit f947b32c71
8 changed files with 94 additions and 46 deletions

View File

@@ -9,10 +9,13 @@ const MONGOUSRP = process.env.MONGOUSRP || ""
const MONGOBASE = process.env.MONGOBASE || 'medizin'
const MONGO_URL = MONGOAUTH ? 'mongodb://'+MONGOUSRP+'@' + MONGOHOST + ':' + MONGOPORT + '/?authSource=admin' : 'mongodb://'+MONGOHOST+':'+MONGOPORT // URL to mongo database
const COLLECTION = 'spritzschema'
let COLLECTION = 'spritzschema'
const doMongo = async function(cmd, options) {
let erg = {err: null}
if (options.testing) {
COLLECTION = 'spritzschema_test'
}
const client = new MongoClient(MONGO_URL, { useUnifiedTopology: true })
try {
await client.connect()