当前位置:网站首页>node. JS express connect mysql write webapi Foundation
node. JS express connect mysql write webapi Foundation
2022-06-25 20:08:00 【Fu Zongheng】
Catalog
newly build
Use webstorm newly build 
Cross domain
Be careful app and router, Corresponding module.exports = app; module.exports = router;
stay app.js or index.js Medium plus 
Kulian

Port default 3306, In case of modification creatConnection Add port that will do
Interface
var url = require(‘url’);
They correspond to each other : Request method , front end query Parameters , Database execution SQL sentence , Return results
front end data data
var data = req.body
In this case .format For custom methods ,javascript Provides more convenient string templates, such as :
var id = 1
var sql = `SELECT * FROM table1 WHERE id='${
id}'`
边栏推荐
- 2021-08-25
- PAT B1051
- Yaml configuration
- New features of php7
- The native JS mobile phone sends SMS cases. After clicking the button, the mobile phone number verification code is sent. The button needs to be disabled and re enabled after 60 seconds
- Panda weekly -2022/02/18
- Appearance of object attributes
- Native JS array some method de duplication
- Number of wechat applet custom input boxes
- Avoid material "minefields"! Play super high conversion rate
猜你喜欢

Wechat applet swiper simple local picture display appears large blank

Bindgetuserinfo will not pop up

<C>. tic-tac-toe

II Traits (extractors)

CG kit explore high performance rendering on mobile terminal

Uni app through uni Navigateto failed to pass parameter (pass object)

JS asynchronism (I. asynchronous concept, basic use of web worker)

Wechat applet connects to the server to display mqtt data information

Vulnhub range - correlation:2

My official account writing experience sharing
随机推荐
Is it safe to open an online account for new bonds? What should be paid attention to
Matlab_ two point zero five
JS asynchronism (I. asynchronous concept, basic use of web worker)
PAT B1063
2.4 finding the sum of the first n terms of the interleaved sequence
Wechat applet connects to the server to display mqtt data information
Redis core article: the secret that can only be broken quickly
The error log of vscode connecting to the server shows the problem of "insufficient permission". Directly use root to connect
手机开户股票安全吗,买股票在哪开户?
Web components - Basics
PAT B1071
PAT B1053
Impact of Huawei application transfer and application claim on user identification
Validation of TTF font by validator of laravel
Remember to deploy selenium crawler on the server
Log in to Huawei game with a minor account, and pop up anti addiction prompt after startup
Avoid material "minefields"! Play super high conversion rate
Use of serialize() and serializearray() methods for form data serialization
PAT B1086
Applet canvas generate sharing Poster