Objective:
Nodejs We are not unfamiliar, why choose MySQL, MySQL lightweight, much better than SQL Server, anyway, I think so.
Installation:
First install the Nodejs, after the installation is successful and then CMD appears below this is good,
Then there is MySQL, which is not necessary (save space for the server).
Install the Mysql-connector-net-plat software (for the C # connection to the MySQL service), which are intended for the following purposes:
As long as there are a large number of forms of XLS and xlsx, I use Nodejs to first read their XLS into memory in JSON, then use MySQL storage, the end user to access the desired data through the web.
Structure diagram:
Nodejs required modules: MySQL, node-xlsx that's it. Install the module in a very simple way NPM installs (press and hold the folder shift button to quickly command line NPM)
This is the preparatory work:
var xlsx = require ("node-xlsx"); var mysql = require (' mysql '); var db = mysql.createconnection ({ host: ' 127.0.0.1 ', User: ' root ' , ' 111111 ', ' Zcz '});d b.connect ();
function Getpingyingbykanji (Carcodekanji) {}//Gets the Pinyin method through Chinese characters,
The end result is a circular judgment SQL statement that eventually makes up a complete SQL statement that is saved directly to the DB.
In this way, a system that quickly finds the XLS table data is implemented.
----------------------Gorgeous split-line--------------------------
Give the test address: http://182.92.155.97:8081/web/fun/index.html (do not click Hard, the server can not bear/(ㄒoㄒ)/~~)
Welcome everyone to advise!
The first article of the New Year, I wish you a happy New Year!
Nodejs+mysql+c#+jquerymobil realization of national vehicle search service