https://github.com/numtel/reactive-mysql-example
Example of reactive data using mysql-live-select with Express, SockJS, and React
https://github.com/numtel/reactive-mysql-example
Last synced: 7 months ago
JSON representation
Example of reactive data using mysql-live-select with Express, SockJS, and React
- Host: GitHub
- URL: https://github.com/numtel/reactive-mysql-example
- Owner: numtel
- Created: 2015-01-05T08:59:02.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2019-05-22T19:54:48.000Z (almost 7 years ago)
- Last Synced: 2025-03-21T06:41:24.510Z (about 1 year ago)
- Language: JavaScript
- Size: 14.1 MB
- Stars: 51
- Watchers: 10
- Forks: 12
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Reactive MySQL example application
A reactive scoreboard built using the following Javascript components:
* [mysql-live-select](https://github.com/numtel/mysql-live-select) - Provide events on `SELECT` statement result set updates
* [Express](http://expressjs.com) - Web framework
* [SockJS](http://sockjs.org) - WebSocket emulation
* [React](http://reactjs.org) - User interface library
Click on a player to select and then click on the arrow to increment their score.

Insert, increment and delete operations are latency-compensated.
## Installation
Installation requires configuring a MySQL server to output a binary log. See the [`mysql-live-select` Readme](https://github.com/numtel/mysql-live-select) for more information.
```bash
$ git clone https://github.com/numtel/reactive-mysql-example.git
$ cd reactive-mysql-example
$ npm install
# Update MySQL configuration
$ vim settings.js
# Add example data to MySQL server
$ mysql < example.sql
# Start server on port 5000
$ node index.js
```
## License
[Unlicense](http://unlicense.org/)