Build with supabase realtime and leafletjs. [Demo App]
git clone https://github.com/supabase/supabase
cd supabase/examples/live-tracker-map
npm install
# Open a terminal and run:
npm run dev
Visit http://localhost:4000 and start testing!
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)
);
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>