生活其实很有趣
const connection = mysql.createConnection(db)长时间不操作mysql,会自动关闭连接,导致服务中断。
修改为:使用连接池const connection = mysql.createPool(db)
要发表评论,您必须先登录。