This project is an example with NodeJS, MySQL and Highcharts that shows how to graph some variables into a Chart reading from MySQL with a NodeJS service.
File explanations:
index.js
create /service1 endpoint that reads MySQL DB table
index.html
HighCharts and JQuery that periodically call the service to show data on the graph
variables.sql
Demo MySQL table with some example data
test.sql
new Inserts examples
- Clone the project
- Install nodejs
- Install vagrant and run the Vagrant machine in mysql-vagrant folder Skip if you have MySQL already installed somewhere
- Install bower
- Restore node_modules using
npm install
from the root project folder - Restore bower_components in public folder using
bower install
- Create demo DB and table using the variables.sql script
- Execute node index.js
- Connect to (http://localhost:3000/index.html) to show the graph.