I wanted to see a blue duck, so I drew a blue duck.
(I wanted to see the sites near me, without trolling through a long list and looking for suburb names... so I built a map!)
This site is an Azure Static Web Apps site using Vue.js. It uses Azure Functions to communicate with a CosmosDB for caching geocode data.
If you want to fork and run it yourself, here are helpers:
npm install
npm run serve
npm run build
npm run servelocal
For more info about using this, see https://docs.microsoft.com/en-us/azure/static-web-apps/add-api?tabs=vue.
Local debugging
I found that when runnign with the Static Web Apps CLI, it was not giving me the abiltity to properly debug my code. So the workaround I used was to run the Azure Functions locally using the following command:
swa start . --api api
and then running the Vue app using this command:
npm run serve
And just ensure that the API URLs are pointing at the site fired up by swa
(e.g. http://192.168.1.178:4280/api/...
)
npm run lint
- removing old/expired sites drop off the map (currently it just adds any new sites, it never deletes ones that have been removed)