878 B
878 B
GPS Tracker
A web interface to render GPS data points stored in a PostgreSQL database on a map.
Installation
-
Clone the repository:
git clone https://github.com/yourusername/gps-tracker.git cd gps-tracker
-
Install dependencies:
npm install
-
Create a
.env
file with the following content:DATABASE_URL=postgres://username:password@localhost:5432/gpstracker PORT=3000
-
Create the
gps_data
table in your PostgreSQL database:CREATE TABLE gps_data ( id SERIAL PRIMARY KEY, latitude FLOAT NOT NULL, longitude FLOAT NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
-
Start the server:
npm start
-
Open your browser and navigate to
http://localhost:3000
.
Usage
Add your GPS data points to the PostgreSQL ▋