Skip to content

Commit 13eee0a

Browse files
ahmed-machineclaude
andcommitted
Fix mobile map API calls by using relative URLs
API base was hardcoded to localhost:3001, which fails on mobile devices. Use relative paths instead and configure shadow-cljs dev-http to proxy API requests to the backend in development. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 84352e7 commit 13eee0a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

shadow-cljs.edn

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
[re-frame "1.3.0"]
55
[cljs-ajax "0.8.4"]]
66

7-
:dev-http {8280 "public"}
7+
:dev-http {8280 {:root "public"
8+
:proxy-url "http://localhost:3001"
9+
:use-index-files true}}
810

911
:builds
1012
{:app {:target :browser

src/howfar/api.cljs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(:require [ajax.core :as ajax]
33
[re-frame.core :as rf]))
44

5-
(def api-base "http://localhost:3001")
5+
(def api-base "")
66

77
(defn api-url [path]
88
(str api-base path))

0 commit comments

Comments
 (0)