Spaces:
Running
Running
Update app.js
#1
by
mhndayesh - opened
app.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
| 1 |
// --- CONFIGURATION ---
|
| 2 |
-
// Set this to your Railway URL
|
| 3 |
-
|
| 4 |
-
const BACKEND_URL = "https://your-railway-app.up.railway.app";
|
| 5 |
|
|
|
|
|
|
|
| 6 |
|
| 7 |
const chatContainer = document.getElementById('chat-container');
|
| 8 |
const userInput = document.getElementById('user-input');
|
|
@@ -132,4 +133,4 @@ userInput.addEventListener('keydown', (e) => {
|
|
| 132 |
userInput.addEventListener('input', function () {
|
| 133 |
this.style.height = 'auto';
|
| 134 |
this.style.height = (this.scrollHeight) + 'px';
|
| 135 |
-
});
|
|
|
|
| 1 |
// --- CONFIGURATION ---
|
| 2 |
+
// Set this to your Railway URL
|
| 3 |
+
let BACKEND_URL = "https://prod-infinit-memory-production.up.railway.app";
|
|
|
|
| 4 |
|
| 5 |
+
// Safety: Remove trailing slash if the user adds one
|
| 6 |
+
if (BACKEND_URL.endsWith('/')) BACKEND_URL = BACKEND_URL.slice(0, -1);
|
| 7 |
|
| 8 |
const chatContainer = document.getElementById('chat-container');
|
| 9 |
const userInput = document.getElementById('user-input');
|
|
|
|
| 133 |
userInput.addEventListener('input', function () {
|
| 134 |
this.style.height = 'auto';
|
| 135 |
this.style.height = (this.scrollHeight) + 'px';
|
| 136 |
+
});
|