Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thinkswan/express-tracking-dashboard
An Express app that tracks visits in realtime by using a tracking pixel.
https://github.com/thinkswan/express-tracking-dashboard
express javascript socket-io tutorial
Last synced: about 2 months ago
JSON representation
An Express app that tracks visits in realtime by using a tracking pixel.
- Host: GitHub
- URL: https://github.com/thinkswan/express-tracking-dashboard
- Owner: thinkswan
- License: mit
- Created: 2019-06-27T18:15:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-09T15:26:34.000Z (almost 4 years ago)
- Last Synced: 2023-03-11T18:28:16.715Z (almost 2 years ago)
- Topics: express, javascript, socket-io, tutorial
- Language: JavaScript
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# express-tracking-dashboard
An Express app that tracks visits in realtime by using a tracking pixel.
Based on the tutorial found at
https://www.airpair.com/javascript/node-js-tutorial.## How to use
```
git clone [email protected]:thinkswan/express-tracking-dashboard.git
npm install
npm start
```This will start a server at http://localhost:5000.
To watch the dashboard track visits, open http://localhost:5000/track.gif in a
separate tab. Each time you refresh this new tab, the dashboard will log a new
visit.## How to deploy
Click the button below to spin up your own copy of the app in a Heroku
instance.[![Deploy to Heroku](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)
## How it works
The server (`server.js`) runs an Express app that uses Socket.IO to emit a
`visit` event each time the `/track.gif` URL is hit.The client app (`app.js`) listens for the `visit` event and appends an element
with the visitor's details (time, IP, and user agent) to the dashboard.The app is stateless, so refreshing the dashboard will clear all visits.
## License
MIT