SvelteKit + Azure Functions + MapLibre + Azure Table Storage
This repo is my starter scaffold to build a single-page app that shows geo-located text data stored in Azure Table Storage. It includes:
functions/) that exposes an HTTP endpoint to list geo posts from a table called GeoPosts.app/) that uses MapLibre to display the posts on a map.Quick steps
npm i -g azure-functions-core-tools@4 --unsafe-perm true
cd functions
npm install
# set TABLE_CONNECTION_STRING in local.settings.json or environment
npm run populate # optional: populate sample data
npm start # runs function locally on http://localhost:7071
cd app
npm install
npm run dev # runs SvelteKit dev server (proxies /api to localhost:7071)
Notes
TABLE_CONNECTION_STRING (and optionally TABLE_NAME) in functions/local.settings.json or environment./api to the local function runtime so fetch('/api/getPosts') works during dev.API endpoints
GET /api/getPosts — lists all posts from the GeoPosts table.POST /api/addPost — create a new post. JSON payload: { "text": "...", "latitude": 47.6, "longitude": -122.3 }.