qianshanxue11 / nodejs-mysql-highcharts

NodeJs - MySql - Highcharts example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nodejs-mysql-highcharts

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

How to try the project on your laptop

  1. Clone the project
  2. Install nodejs
  3. Install vagrant and run the Vagrant machine in mysql-vagrant folder Skip if you have MySQL already installed somewhere
  4. Install bower
  5. Restore node_modules using npm install from the root project folder
  6. Restore bower_components in public folder using bower install
  7. Create demo DB and table using the variables.sql script
  8. Execute node index.js
  9. Connect to (http://localhost:3000/index.html) to show the graph.

About

NodeJs - MySql - Highcharts example


Languages

Language:HTML 75.0%Language:JavaScript 12.6%Language:Ruby 6.6%Language:Shell 5.8%