From 3f4e89abb9043fa338e6a5e84b000981c1cfdda8 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Sat, 18 Nov 2023 19:33:03 +0100 Subject: [PATCH] Created the socket.js --- client/src/common/utils/socket.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 client/src/common/utils/socket.js diff --git a/client/src/common/utils/socket.js b/client/src/common/utils/socket.js new file mode 100644 index 0000000..b3505f3 --- /dev/null +++ b/client/src/common/utils/socket.js @@ -0,0 +1,5 @@ +import { io } from 'socket.io-client'; + +const URL = process.env.NODE_ENV === "production" ? "https://pmg-api.gnmyt.dev" : "http://localhost:3000"; + +export const socket = io(URL); \ No newline at end of file