server/database/datasource.ts

21 lines
688 B
TypeScript
Raw Normal View History

2024-03-12 19:27:50 +01:00
// import { Queue } from "bullmq";
import { PrismaClient } from "@prisma/client";
import { ConfigManager } from "config-manager";
2023-09-11 05:31:08 +02:00
const config = await new ConfigManager({}).getConfig();
2023-09-11 05:31:08 +02:00
const client = new PrismaClient({
datasourceUrl: `postgresql://${config.database.username}:${config.database.password}@${config.database.host}:${config.database.port}/${config.database.database}`,
});
2024-03-12 19:27:50 +01:00
/* const federationQueue = new Queue("federation", {
2023-11-27 02:40:44 +01:00
connection: {
host: config.redis.queue.host,
2023-11-27 06:53:13 +01:00
port: Number(config.redis.queue.port),
password: config.redis.queue.password || undefined,
2023-11-27 06:30:57 +01:00
db: config.redis.queue.database || undefined,
2023-11-27 02:40:44 +01:00
},
2024-03-12 19:27:50 +01:00
}); */
2023-11-27 02:40:44 +01:00
2024-03-12 19:27:50 +01:00
export { client /* federationQueue */ };