var express = require('express');引入express框架 var router = express.Router();引入router路由级中间件 var data = require("../data");引入data文件 var url = require("url");引入url模块 var fs = require('fs');引入fs模块 var qs = require("querystring");查…
var express = require('express'); var mysql = require('mysql'); var app = express(); var bodyParser = require('body-parser'); //链接数据库 var connection = mysql.createConnection({ host: 'localhost', user: 'root', password: '123456', database: 'school' })…
var express = require('express'); var bodyParser = require("body-parser"); var cors = require('cors'); var app = express(); var mysql = require('mysql'); var connection = mysql.createPool({ connectionLimit : 10, host : 'localhost', user : 'root'…