how to edit web app on VPS

mbret4 months ago

hi, I have installed the Traccar on VPS from wget https://www.traccar.org/download/traccar-linux-64-latest.zip ...
need help to edit the web app on the VPS how to edit it.please some help me

Anton Tananaev4 months ago

You have to download the source code first:

https://www.traccar.org/source-code/

Then you can edit it.

This might be useful as well:

https://www.traccar.org/build-web-app/

mbret4 months ago

yes, I have downloaded it made the necessary changes built it, and released the build, by running npm run build.
now I have the file in the build folder. Now how to replace them on VPS

Anton Tananaev4 months ago

Just replace the modern folder with the result of your build.

mbret4 months ago

I have followed the steps from the tutorial https://www.traccar.org/install-digitalocean/ to install traccar on VPS

mbret4 months ago

how to I replace the modern folder with the result of your build?

what command to use in CMD to replace the file?

Anton Tananaev4 months ago

Are you serious? You don't know how to copy files? I'm sure there are countless resources online where you can find an answer. It's not something specific to Traccar.

mbret4 months ago

sorry my bad i want to know the director where I need to replace the folder.
example
cat > /opt/traccar/conf/traccar.xml

to edit traccar.xml

Anton Tananaev4 months ago

The folder is /opt/traccar/modern, if that's what you're asking.

mbret4 months ago

so now I have to replace the modern folder /opt/traccar/modern with the build folder /opt/traccar/build which I got after npm run build

warning message at the time of build

Anton Tananaev4 months ago

There should be no /opt/traccar/build. You have to replace the content of the folder. The folder should stay the same. That's what replacing means.

mbret4 months ago

I am using this commands cp -r /opt/traccar/modern /opt/traccar/modern_backup

cp -r /path/to/modern/* /opt/traccar/modern by renaming the build as modern