Live Tracker Map
Build with supabase realtime and leafletjs. [Demo App]
How to use
Clone this folder
git clone https://github.com/supabase/supabase
cd supabase/examples/live-tracker-map
Install dependencies
npm install
Start the app
# Open a terminal and run:
npm run dev
Visit http://localhost:4000 and start testing!
Test with your own Supabase Project
Create locations table
Go to app.supabase.io, create a new organisation and project if you haven't had one.
Run this sql query to create locations
table.
CREATE TABLE locations (
id bigint GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
latitude numeric NOT NULL,
longitude numeric NOT NULL,
ref VARCHAR(40)
);
Setup env vars
Make a .env.local in this folder with the following, you can get these values from your project dashboard at app.supabase.io:
NEXT_PUBLIC_SUPABASE_ENDPOINT=<your-supabase-url>
NEXT_PUBLIC_SUPABASE_APIKEY=<your-supabase-key>