mal*_*lik 2 node.js express
我想在模型中编写函数以获取用户ip,并希望存储在用户表中的节点js中具有列名ip_address。(使用express,mysql)
User.prototype.userip= function(req, res) { // here need access to IP address here }
小智 6
req.connection.remoteAddress
尝试这个
归档时间:
7 年,6 月 前
查看次数:
49 次
最近记录: