synchronize files with the local server
Feature Request
just like in other framework like ionic or angular the files are synchronized with the local server when testing
its very annoying to type every time you make changes cordova run browser it will be much easier if the files inside the www folder are synchronized with the browser.
to solve this issue I create this python script https://github.com/aymenBox/cordova-sync-browser/tree/main
which detect any changes in any file inside the www folder than stop the current server and start another one fill free to use it any one
Cordova has a cordova serve command that runs a local server that serves the cordova.js file as well as your project web assets. It can be used for several different platform types.
https://cordova.apache.org/docs/en/latest/reference/cordova-cli/#cordova-serve-command
cordova --help serve
Synopsis
cordova serve [PORT]
Run a local web server for www/ assets. Port defaults to 8000.
Access projects at: http://HOST_IP:PORT/PLATFORM/www
That's true but this hase nothing to do with what I'm talking about! The serve command runs a local server but when you make changes to your project files you will have to close the courent server and open an other one the file in the www folder are not synchronized with the server please read carefully and check out the python script i put to understand more the problem and i can give you an other exemple if you are familiar with the angular framework than you are familiar with the ng serve command and this command not inly runs your project over a local host but also reload the browser screen every time a file changes
The serve command runs a local server but when you make changes to your project files you will have to close the courent server and open an other one the file in the www folder are not synchronized with the server
My apologies. I thought cordova serve actually worked this way but it appears it does not. I'll move this feature request to the cordova-serve repo.
up, sorry, I'm also waiting for the update from cordova-serve to the latest cordova version