A simple Web application that renders your GPS traces using OpenStreetMaps
- Migrated frontend to Vue. - Migrated frontend map to OL API. - Extended environment variables. - README. - Country information/flag integration. - Implemented generic db/repo. |
||
---|---|---|
frontend | ||
src | ||
.env.example | ||
.gitignore | ||
package-lock.json | ||
package.json | ||
README.md | ||
tsconfig.json |
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 ▋