Skip to content

Commit 9e87e9f

Browse files
committed
refactor: change ports
1 parent 87ef153 commit 9e87e9f

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

Dockerfile.airflow

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ RUN pip install --no-cache-dir -r requirements.txt
3131
COPY . .
3232

3333
# Expose the port for the Airflow webserver
34-
EXPOSE 8081
34+
EXPOSE 8080
3535

3636
# Set the default command to start the webserver
37-
CMD ["airflow", "webserver", "--port", "8081"]
37+
CMD ["airflow", "webserver", "--port", "8080"]

Dockerfile.dummy

Lines changed: 0 additions & 1 deletion
This file was deleted.

server/server.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ const io = new Server(server, {
1414
io.on("connection", (socket) => {
1515
console.log("A user connected");
1616

17-
// Listen for notifications from the backend (Airflow)
1817
socket.on("notification", (data) => {
1918
console.log("Received notification:", data);
20-
// Broadcast to all connected clients
2119
io.emit("notification", data);
2220
});
2321

@@ -26,6 +24,15 @@ io.on("connection", (socket) => {
2624
});
2725
});
2826

27+
// Add a GET route to check the socket status
28+
app.get("/status", (req, res) => {
29+
if (io.engine.clientsCount > 0) {
30+
res.json({ message: "Socket is working", clients: io.engine.clientsCount });
31+
} else {
32+
res.status(503).json({ message: "No active connections" });
33+
}
34+
});
35+
2936
server.listen(4000, () => {
3037
console.log("Socket.IO server running on port 4000");
3138
});

0 commit comments

Comments
 (0)