We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
安装mysql模块
npm i mysql
(function(){})()一般会在实际工作中能用到,
(图纸,方位,风水,地质,大小,范围,层高,木结构MVC,MVVM) 框架(架构师)
(斧子,锤子,工具,钻) 库(前端工程师)(jQ封装了方法)
npm i express
路由:找资源文件的路径
var express = require('express') var app = express() //路由 app.get('/', function (req, res) { res.send('Hello World') }) app.get('/list', function (req, res) { res.send('进入index路由') }) app.get('/detail', function (req, res) { res.send('进入home路由') }) app.listen(3000)
处理get请求,获取参数只需要req.query
req.query
app.get()
处理post请求,相对get请求会麻烦点,需要body-parser配合req.body
body-parser
req.body
var bodyParser = require('body-parser'); // parse application/x-www-form-urlencoded app.use(bodyParser.urlencoded({ extended: false })) // parse application/json app.use(bodyParser.json()) app.post()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
爬音乐
mysql
安装mysql模块
闭包 :函数套函数-在实际工作中用处不多
(function(){})()一般会在实际工作中能用到,
express
(图纸,方位,风水,地质,大小,范围,层高,木结构MVC,MVVM)
框架(架构师)
(斧子,锤子,工具,钻)
库(前端工程师)(jQ封装了方法)
路由:找资源文件的路径
处理get请求,获取参数只需要
req.query
处理post请求,相对get请求会麻烦点,需要
body-parser
配合req.body
The text was updated successfully, but these errors were encountered: