任何人都可以帮助我解决DXTREME和PhoneGap之间的区别吗?
我尝试使用PhoneJS - 它很容易上手,似乎提供了一个很好的框架.但是,我通常更喜欢避免使用预先构建的框架,因为它们会灵活地限制我.我主要关注的是:
我试图测试一个PhoneJS应用程序,其数据绑定到本地node.js数据服务器(运行在localhost:3000,数据库MongoDB)它在我的浏览器(Chrome)中正常运行:
$.get('http://127.0.0.1:3000/Categories') get correctly the data...
Run Code Online (Sandbox Code Playgroud)
现在尝试模拟移动设备,我通过Ripple模拟器运行它.应用程序在模拟器中正确显示,但在尝试从节点服务器获取数据时失败....
Failed to load resource: the server responded with a status of 500 (Internal Server Error) https://rippleapi.herokuapp.com/xhr_proxy?tinyhippos_apikey=ABC&tinyhippos_rurl=http%3A//127.0.0.1%3A3000/Categories
Run Code Online (Sandbox Code Playgroud)
回国
{
"code": "ECONNREFUSED",
"errno": "ECONNREFUSED",
"syscall": "connect"
}
Run Code Online (Sandbox Code Playgroud)
AM我错过了一些重要的参数?
这是我的server.js:
var express = require('express'),
categories = require('./routes/category'),
products = require('./routes/product');
var app = express();
cors = require('./cors');
app.use(cors);
// categories
app.get('/categories/:id', categories.findById);
app.get('/categories', categories.findAll);
// products
app.get('/categories/:id/products', products.findByCategory);
app.get('/products/:id', products.findById);
app.get('/products', products.findAll);
app.listen(3000);
console.log('Listening on port 3000...');
Run Code Online (Sandbox Code Playgroud) phonejs ×3
cordova ×2
chart.js ×1
devextreme ×1
html5 ×1
mongodb ×1
node.js ×1
ripple ×1
trigger.io ×1
zepto ×1