Files changed (1) hide show
  1. app.js +5 -4
app.js CHANGED
@@ -1,8 +1,9 @@
1
  // --- CONFIGURATION ---
2
- // Set this to your Railway URL (e.g., "https://your-app.up.railway.app")
3
- // Leave as empty string "" if the frontend and backend are on the same server.
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
+ });