How do you access the API?
Remotely, via static-IP on port 8082
This seems to work fine in debug mode
In debug mode there's a proxy. That's why I'm asking the question.
I see. This is the first time I'm deploying, so I'm not sure what I need to do there.
Sorry if this question was asked before!
Usually you just replace the folder in Traccar.
Hm, ideally I would like to run the front-end separately from the Java backend and database
Can you tell me how the proxy has to act?
Then you need a proxy.
Hello again,
First of all thank you for your outstanding software and for taking the time to respond so quickly.
I have now compiled the Java backend and it's running locally alongside the React web app. However the issue still persists.
I still don't understand why a proxy is necessary and how it has to be configured. I am aware the API uses both REST and WebSocket on port 8082 by default.
I see there are instructions here https://www.traccar.org/secure-connection/ is that the kind of setup you are referring to?
I would be very grateful for a more specific answer
The proxy is needed because the web app expects the API to be available on the same URL. You need to proxy /api
path.
Thank you very much, I got it working now
Proxying /api to localhost:3000 did the trick
Hi, I'm having trouble deploying traccar-web tagged 5.8
When running
npm start
everything works fine. However when I runnpm run build
and thenserve -s build
the browser showsUnexpected token '<', "<!doctype "... is not valid JSON
What could be the issue?
Any help is greatly appreciated, thanks