我想在我的sencha touch应用程序中使用socket.io
我在app.json js数组中添加了socket.io:
"js": [
{
"path": "touch/sencha-touch.js",
"x-bootstrap": true
},
{
"path": "bootstrap.js",
"x-bootstrap": true
},
{
"path": "lib/socket.io.js"
},
{
"path": "app.js",
"bundle": true, /* Indicates that all class dependencies are concatenated into this file when build */
"update": "delta"
}
这里是我要创建var socket的地方:
var socket = io.connect('http://localhost:3000');
当我在浏览器中打开index.html时出现此错误:
ReferenceError: Can't find variable: io
如何修复我的申请?