当前位置:网站首页>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}'`
边栏推荐
- Processing method for uniapp or applet onload not receiving parameters
- Go language installation and uninstallation
- 2.15(Multiple of 3 Or 5)
- <C>. Figure guessing game
- Applet Click to return to the top 2 methods
- 2.17(Avoid The Lakes)
- Skills of CCF question 2
- Validation of TTF font by validator of laravel
- New features of redis 6.0: take you 100% to master the multithreading model
- Pat b1054 average (20 points)
猜你喜欢
Vulnhub range the planes: mercury
Does redis transaction support acid?
CG kit explore high performance rendering on mobile terminal
How to understand var = a = b = C = 9? How to pre parse?
Now meditation: crash service and performance service help improve application quality
Use of serialize() and serializearray() methods for form data serialization
Applet password input box
Pcl+vs2019+opencv environment configuration
<C>. Figure guessing game
Wechat applet swiper simple local picture display appears large blank
随机推荐
Web container basic configuration
2.15(Multiple of 3 Or 5)
Bindgetuserinfo will not pop up
<C>. Calculation date to day conversion
PAT B1053
JS asynchronism (III. usage of generator and async/await)
2.2 step tariff
5、 Initialization analysis II of hikaricp source code analysis
打新债证券开户安全吗
JS mobile phone and computer open different websites
<C>. tic-tac-toe
Remember to deploy selenium crawler on the server
Randomly generate 100 non repeating numbers between 1 and 150 and put them in the array
Clickhouse disables automatic clearing of tables / columns, that is, disables TTL
My official account writing experience sharing
Applet canvas generate sharing Poster
6、 Configuration resolution of hikariconfig
Arduino ide + esp8266+mqtt subscribe to publish temperature and humidity information
<C>. String comparison
PAT B1061