We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c7f15d commit ab961a1Copy full SHA for ab961a1
src/config.js
@@ -0,0 +1,17 @@
1
+const config = {
2
+ // Development WebSocket URL (local testing)
3
+ development: 'ws://localhost:3001',
4
+
5
+ // Production WebSocket URL (using Render.com URL)
6
+ production: 'wss://discord-clone-websocket.onrender.com',
7
8
+ // Get the appropriate WebSocket URL based on environment
9
+ get websocketUrl() {
10
+ if (window.location.hostname === 'localhost') {
11
+ return this.development;
12
+ }
13
+ return this.production;
14
15
+};
16
17
+export default config;
0 commit comments