A real-time device tracking application built with Node.js, Express, Socket.IO, and Leaflet. This application enables users to track their devices' location on a map in real-time using geolocation.
- Real-time location tracking: Updates device locations on the map in real time using WebSocket.
- Interactive map: Displays device locations using the Leaflet library.
- Responsive design: Optimized for various screen sizes, ensuring a smooth user experience.
- Node.js
- Express
- Socket.IO
- Leaflet
- HTML/CSS
Ensure the following tools are installed on your machine:
- Node.js
- npm (Node Package Manager, included with Node.js)
-
Clone this repository:
git clone <repository-url> cd realtime-device-tracking
-
Install dependencies:
Run the following command to install the required packages:npm install
-
Start the server: To start the application, use the following command:
node app.js
Alternatively, you can use nodemon for automatic reloading during development:
npm install -g nodemon npx nodemon app.js
Open your browser and navigate to:
http://localhost:<PORT>
Replace
<PORT>with the port number specified in app.js (default is 3000).
Allow geolocation permissions when prompted by the browser.
Observe your real-time location and other devices updating dynamically on the map.