之前已经用nodejs开发好了一个移动浏览器应用,使用了mongoose,express等模块,现在想用phonegap包装成一个Hybrid app,已经使用npm 安装好phonegap,并实现了一个HelloWorld的app,请问我怎样把之前开发好的移动浏览器应用程序移植到phonegap中?求牛人们给个指导,谢谢! 客户端代码: $.ajax({ type:"get", url:"http://127.0.0.1:18080/", data:{'category':param.substring(1),'p':obj.pageIndex}, dataType:'json', beforeSend:$.ui.showMask(), error: function(jqXHR, textStatus, errorThrown) { alert('error ' + textStatus + " " + errorThrown); }, success:function(data){ console.log(data); } });
服务器端代码: var http = require('http'); var url = require("url"); http.createServer(function (req, res) { var params = url.parse(req.url, true).query; console.log(params); }).listen(18080); console.log('Server running on port http://127.0.0.1:18080/');
运行后,服务器端完全没反应啊?哪位大侠给看看