node 判断pc还是手机
var express = require('express');
var app = express()
app.get('/', function(req, res){
var deviceAgent = req.headers["user-agent"].toLowerCase();
var agentID = deviceAgent.match(/(iphone|ipod|ipad|android)/);
if(agentID){
console.log(111,'手机、pid')
}else{
console.log(222,'pc')
}
})
app.listen(3000)