🔧 Fixed connection string interpolation for rabbitMQ in docker-compose config

This commit is contained in:
2021-10-14 22:31:29 -07:00
parent 972ba48e6f
commit 049c4266f3

View File

@@ -19,7 +19,7 @@ app.use(bodyParser.urlencoded({ extended: true }));
const port: number = Number(process.env.PORT) || 8050; // set our port const port: number = Number(process.env.PORT) || 8050; // set our port
// set rabbitMQ host // set rabbitMQ host
const rabbitMQConnectionString = rabbitMQDockerConnectionString || "localhost"; const rabbitMQConnectionString = process.env.RABBITMQ_URI || "amqp://localhost";
// Send index.html on root request // Send index.html on root request
app.use(express.static("dist")); app.use(express.static("dist"));
@@ -46,7 +46,7 @@ io.on("connection", (socket) => {
}); });
}); });
amqp.connect(`amqp://${rabbitMQConnectionString}`, (error0, connection) => { amqp.connect(`${rabbitMQConnectionString}`, (error0, connection) => {
if (error0) { if (error0) {
throw error0; throw error0;
} }