Server backed saving routes

This commit is contained in:
marijo 2026-06-29 08:52:32 +00:00
parent 18de453ac1
commit a4d6a8e99e
4 changed files with 102 additions and 25 deletions

View file

@ -8,10 +8,10 @@ A small static webpage for saving and sharing Google Maps route links.
- Optional date, description, and uploaded picture
- Click route names to open saved Google Maps links
- Edit, remove, share, or copy route links
- Data is stored locally in the browser with `localStorage`
- Routes are stored on the webserver in `data/routes.json`
- Simple secret gate before the app opens
Open `index.html` in a browser to use it.
Deploy the files to a PHP-enabled webserver and open `index.html` in a browser.
## Secret
@ -25,4 +25,6 @@ cp config.example.js config.js
window.ROUTES_SECRET = "your-secret";
```
`config.js` is gitignored. This is a simple client-side gate, not strong server-side security.
`config.js` is gitignored. `api.php` reads the same secret and stores shared routes in `data/routes.json`, which is also gitignored.
Make sure the webserver user can write to the `data/` directory. This is a simple shared-secret gate, not strong security.