一、腾讯云serverless搭建Mysql数据库访问接口
/**************************************************
Node8.9-Mysql
Reference: mysql api---https://www.npmjs.com/package/mysql
Reference: How to access database---https://cloud.tencent.com/document/product/236/3130
Reference: How to connect api gateway with scf---https://cloud.tencent.com/document/product/628/11983
***************************************************/
function wrapPromise(connection, sql) {
return new Promise((res, rej) => {
connection.query(sql, function(error, results, fields) {
if

本文介绍了如何利用腾讯云Serverless平台结合Node.js和MySQL,构建无服务器数据库访问接口,并演示了如何在Express环境中集成。步骤包括创建连接、执行SQL查询和API Gateway的连接配置。
最低0.47元/天 解锁文章
1610

被折叠的 条评论
为什么被折叠?



