Where to save app.js and simple.html in server?

dee-u 3 years ago

I am trying to setup my vps in such a way that I could use the url without requiring the user to login. It appears I may need to use the code from this github link: https://github.com/traccar/traccar-web/tree/master/web/simple

Now, I am not sure where should I save them? Should I create a "web" directory in the traccar directory like this one?

/opt/traccar/web/simple

I would like to be able to use it like this if possible:

<iframe src="http://ip:8082/simple?token=mytoken" >

Or is there any other way I could display the map aside from using an iframe? Thank you so much for any help.

Anton Tananaev 3 years ago

It should already be there under the legacy folder.

As for iframe, it usually doesn't work because of the session cookie.

dee-u 3 years ago

It seems I cannot edit my post. Here's an update:

In the Developer tools (Network), I am getting a response "You need to enable JavaScript to run this app." when I am using http://ip:8082/simple?token=mytoken in the iframe, could that be the reason why it is not working not diplaying anything in the iframe)?

Anton Tananaev 3 years ago

You have not provided enough information. What version? What's the configuration? etc

dee-u 3 years ago

Thank you sir for the prompt response. What then are my alternatives so that I could display the map inside my own webpage?

dee-u 3 years ago

I am even trying it locally but going to the link http://localhost:8082/simple/index.html results in the same error of "You need to enable JavaScript to run this app." I have installed the latest Traccar in Windows 10 sir.
Description text