This is a twin project of WebSocket Real-time Tracker.
It is a sockjs-server template that fetches data from MongoDB at regular intervals.
- Maven 3.6.0 or higher versions
- Java 11
- MongoDB 4.4.5 or higher versions
- SockJS
- STOMP
- Spring Boot
- Spring
- Sping MVC
- Clone this project on IntelliJ IDEA.
- Run
\src\main\java\com\singfung\tracker\SockJSRealTimeTrackerApplication.java
. - Add some samples to MongoDB by running
\api-samples\saveGPS.http
. It adds the GPS information of two vehicles into MongoDB (v100
andv101
). - Open three tabs in a browser(
http://localhost:8080/v100.html
,http://localhost:8080/v101.html
andhttp://localhost:8080/v102.html
). ClickConnect
to start tracking andDisconnect
to end it.