init user-service

This commit is contained in:
2023-09-27 16:51:22 +01:00
parent 0341a938fd
commit b725dae0f9
21 changed files with 5565 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
function getMongoURI(): string {
if (process.env.MONGODB_URI === undefined) {
throw new Error("mongodb_uri configuration not provided");
} else {
return process.env.MONGODB_URI
}
}
function getKafkaBrokers(): string[] {
if (process.env.KAFKA_BROKERS === undefined) {
throw new Error("kafka_brokers configuration not provided");
} else {
return process.env.KAFKA_BROKERS.split(",")
}
}
const mongodbUri = getMongoURI();
const kafkaBrokers = getKafkaBrokers();
export { mongodbUri, kafkaBrokers }