murtaza-2007 commited on
Commit
32cf0ee
Β·
1 Parent(s): 2bd66df

Point frontend at production backend, add MIT license, expand .gitignore

Browse files

Frontend and backend are deployed on separate domains (Vercel + Render),
so AC_BACKEND needs to be a fixed URL rather than the dynamic
window.location.hostname trick used for local/LAN dev.

Also adds an MIT LICENSE file and expands .gitignore to cover Python
venvs, editor settings, and OS cruft.

Files changed (3) hide show
  1. .gitignore +16 -0
  2. LICENSE +21 -0
  3. app.js +7 -15
.gitignore CHANGED
@@ -1,5 +1,21 @@
 
1
  __pycache__/
2
  *.pyc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  *.bak
4
  .claude/
5
  .env
 
1
+ # Python
2
  __pycache__/
3
  *.pyc
4
+ *.pyo
5
+ venv/
6
+ .venv/
7
+ env/
8
+ *.egg-info/
9
+
10
+ # Editor / IDE
11
+ .vscode/
12
+ .idea/
13
+
14
+ # OS
15
+ .DS_Store
16
+ Thumbs.db
17
+
18
+ # Project-specific
19
  *.bak
20
  .claude/
21
  .env
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Murtaza Vali
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
app.js CHANGED
@@ -162,21 +162,13 @@ function extractTitleFromWikiUrl(input) {
162
  // original bodies, see the dedicated NOTE comments near those functions).
163
  // ════════════════════════════════════════════════════════════════════════════
164
 
165
- // Single source of truth for the backend origin. Derived from whatever host
166
- // the page itself was loaded from (not hardcoded to 'localhost') so this
167
- // works unmodified whether you open it as localhost, as a LAN IP from
168
- // another device on the same network (backend already binds 0.0.0.0 β€” see
169
- // main.py), or any other dev hostname β€” as long as the backend listens on
170
- // the same host, just port 8000. After deploying to separate frontend/
171
- // backend hosts (e.g. Render), replace this line with the fixed backend URL
172
- // (e.g. 'https://aurelius-backend.onrender.com') β€” the WebSocket URL below
173
- // is derived from it automatically (http→ws, https→wss), so nothing else in
174
- // this file needs to change.
175
- // window.location.hostname is '' when the page is opened as a local file
176
- // (file://index.html, which is how this app is normally launched per
177
- // CLAUDE.md) rather than served over http(s) β€” fall back to 'localhost' for
178
- // that case so AC_BACKEND never becomes the invalid 'http://:8000'.
179
- const AC_BACKEND = `http://${window.location.hostname || 'localhost'}:8000`;
180
  const AC_BACKEND_WS = AC_BACKEND.replace(/^http/, 'ws');
181
  const WIKI_OPENSEARCH = 'https://en.wikipedia.org/w/api.php';
182
 
 
162
  // original bodies, see the dedicated NOTE comments near those functions).
163
  // ════════════════════════════════════════════════════════════════════════════
164
 
165
+ // Single source of truth for the backend origin. Frontend (Vercel) and
166
+ // backend (Render) are deployed on separate domains, so this must be a
167
+ // fixed URL β€” the dynamic window.location.hostname trick used in local/LAN
168
+ // dev only works when frontend and backend share a host. The WebSocket URL
169
+ // below is derived from it automatically (http→ws, https→wss), so nothing
170
+ // else in this file needs to change if the backend URL changes.
171
+ const AC_BACKEND = 'https://aurelius-9ly2.onrender.com';
 
 
 
 
 
 
 
 
172
  const AC_BACKEND_WS = AC_BACKEND.replace(/^http/, 'ws');
173
  const WIKI_OPENSEARCH = 'https://en.wikipedia.org/w/api.php';
174