clouda-team / cloudajs Goto Github PK
View Code? Open in Web Editor NEWClouda Framework - A Realtime Javascript RIA Framework For Mobile WebApp
Clouda Framework - A Realtime Javascript RIA Framework For Mobile WebApp
sumeru如何做分页呢?能否有demo,参考下,看文档不太懂,不知道怎么弄了使用sumeru.publishByPage与subscribeByPage。请指点。
各位大神,我们的App上线了2天,现在数据连接不上,提示连接数超了,请问哪里可以设置连接数限制?还是你们平台那边才能设置呢?谢谢。
我也不知道做了什么操作导致的。目前sumeru命令完全无法使用了
现象,操作系统ubuntu 13.04:
caomu@caomu-Aspire:$ sumeru start$ sumeru init ./myproject
caomu@caomu-Aspire:
caomu@caomu-Aspire:~$
就是打什么命令下去都是没有反应
看了clouda的几个例子,发现像新闻类的数据抓取应用,clouda有优势,但是向外部站点发起查询请求,显示查询结果的应用,clouda是否可以做?
此框架是否可以用于商业项目?免费还是收费?
Firefox 无法建立到 ws://xxx.sx.duapp.com/socket/591/iqgoqx3a/websocket 服务器的连接。
源文件:http://xxx.duapp.com/bin/sumeru.js 行:5
RT
自己试了下,不行。不知道有没有什么办法可以匹配带参数的地址呢?
谢谢。
今天将本地测试通过的Todolist工程提交到BAE上做测试(已经按照https://github.com/brandnewera/sumeru/blob/master/docs/upload_to_BAE.md 这篇文章对工程配置进行更改),但发现打开http://testgc.duapp.com/ 后网页空白。查看网页源代码后发现此页引用的http://testgc.duapp.com/bin/sumeru.css , http://testgc.duapp.com/bin/sumeru.js ,http://testgc.duapp.com/bin/app.js 都是404 not found。但是非bin文件夹下的文件可以正常找到(如:http://testgc.duapp.com/assets/css/todos.css )。登录到后台发现bin文件夹以及文件都是存在的。有些不懂,希望路过的大神@tongyao可以帮忙解决下。ps:官方例子中http://sumerutodolist.duapp.com/bin/sumeru.css 是可以找到的。
我已经成功安装了nodejs和mongodb,报错信息:DB OPEN ERROR[Error:failed to connect to [127.0.0.1:27017]]
sudemo sumeru start
NON BAE MODE
BaseDir :/Users/mdemo/work/code/sudemo/
DstDir :/Users/mdemo/work/code/sudemo/app
WARN: Side effects in initialization of unused variable extendFrom [null:370,8]
WARN: Side effects in initialization of unused variable getProxy [null:384,8]
runing [NetMessage] in server
= Please ensure that you set the default write concern for the database by setting =
= one of the options =
= =
= w: (value of > -1 or the string 'majority'), where < 1 means =
= no write acknowlegement =
= journal: true/false, wait for flush to journal before acknowlegement =
= fsync: true/false, wait for flush to file system before acknowlegement =
= =
= For backward compatibility safe is still supported and =
= allows values of [true | false | {j:true} | {w:n, wtimeout:n} | {fsync:true}] =
= the default value is false which means the driver receives does not =
= return the information of the success/error of the insert/update/remove =
= =
= ex: new Db(new Server('localhost', 27017), {safe:false}) =
= =
= http://www.mongodb.org/display/DOCS/getLastError+Command =
= =
= The default of no acknowlegement will change in the very near future =
= =
/Users/mdemo/work/code/sudemo/sumeru/server/../../app/publish didnot exist
SockJS v0.3.5 bound to "/socket"
File Server Listening on 8080
Server Listening on 8082
打开localhost:8080/debug.html#/itworks 页面打不开
sumeru 是最新版本
把Javascript代码放在view里总是什么都不显示?
请教一下如何在Controller里面使用百度图片api
Today i update the latest version of the sumeru , and it doesn't work .
It awalys show the error:GET http://localhost:8082/socket/info
OS:
Node Version:0.7.13
What command you had been using to start the project:sumeru start
我在本地定义了两个modelA,B。mongodb中 A有一个字段是modelB的集合。
样式如下
Model.A = function(exports){
exports.config = {
fields:[
{name:'A1',type:'string'},
{name:'A2',type:'model',relation:'many',model:'Model.B'}
]}}
Model.B = function(exports){
exports.config = {
fields:[
{name:'B1',type:'string'},
{name:'B2',type:'string'}
]}}
在Controller中取A的记录的时候,其中字段A2在本地可以以collection取出 ,但是在线上不行。
例如 msgCollection.find()[0].get('A2').find().length 这句在本地环境可以正常运行,但是在BAE上不行。
求解答。
The developer who using sumeru under 0.7.0 may suffer a slow connection problem on IOS6 device.
To fix this problem, simple modify app/config/sumeru.js, around line 12, add:
clientSocketServer = clientSocketServer.replace('.duapp.com', '.sx.duapp.com');
just above:
sumeru.config({
for version later than 0.7.0, we already have this patch built in. You don't need to do anything.
如题!多谢!
我从 controller A 使用 env.redirect() 跳转到 controller B 后
按 浏览器的返回按钮 页面会覆盖
检查了一下
当我从controller A 跳转到 controller B的时候 controller A 的场景并没有消失 而是隐藏了(display:none)
在controller A 页面未跳转时:
跳转到controller B后
需要在controller B刷新后 才能出现我真正跳转的效果
这两个controller都是最简单的例子 controller A 是官方示例itworks controller B是我自己写的最简单的hello world 所以应该不是我自己代码的问题
看了下env.redirect()中有isforce的参数 我设置了一直还是没有任何效果
我的环境是 ubuntu 12.04 lts 浏览器是 chrome 28.0.1500.71
求解决..
直接下载的demo,运行时没有出现Welcome to sumeru!
看了看打印的日志:
file server accessing /tmp/sumeru-master/app/bin/bin/view/itworks.html
此处有两个bin,明显该路径有问题?是否这个原因造成的?
如题,怎么让IE可以加载APP
各位大神,我按所给的文档做了个Demo,在本地运行都是正常的。然后按照文档里面介绍的,发布到BAE的时候出现了点小问题,还望各位大神指点。问题描述如下:
1)问题出在发布介绍文档(framework-bae.pdf)中的第9步,文档中如下描述:(9)修改sumeru/server/DbCollectionHandler.js
修改该⽂文件第136、137⾏行的username、password,输⼊入分配的username和password
username = "SmrWebApp";//fw.config.get('bae_user');
password = "AppWebSumeru%";//fw.config.get('bae_password');
我严格按照文档中所说的进行修改了,运行失败,socket服务无法启动,提示500内部服务器错误。后来我又尝试着把上面的用户名和密码修改为我们的百度账号,还是不行。需要说明的是:我们已经在BAE的后台创建了一个Mongo的数据库,并且分配了权限给App。各种尝试,始终不行。后来干脆修改为你们上传的一个Demo中的设置,即按如下设置:host = "10.50.147.16";
port = 43030;
username = "SmrWebApp";//fw.config.get('bae_user');
password = "AppWebSumeru%";//fw.config.get('bae_password');
这样设置后,就可以正常运行了。这里的IP和端口都是写死了的,肯定不是最终的解决方案。
2)希望获得的帮助:我想请问一下,这4行代码到底应该怎么设置才能正常启动程序?即host,port,username,password分别应该怎么样设置?这些值从哪里可以获取到?后台是否还需要其他额外的操作或者设置呢?
不胜感激,期待回复!
两个库有很多共同点,各有侧重的样子,因为以前用Backbone,所以很好奇[开发指南]中最后说的通过package.js引入Backbone之类的,引入之后呢? 该怎么集成?没有头绪啊,另外,如果在Sumeru中再引用Backbone,会不会有些多余,因为重叠的功能不少!能不能哪位指点一下,谢谢!
问题描述请看这里:#14
我按新版本的设置试过,可是还是不行,socket服务无法正常启动,返回500 Internal Server Error ,以至于App无法正常运行。即下面4行代码:
host = process.env.BAE_ENV_ADDR_MONGO_IP;
port = +process.env.BAE_ENV_ADDR_MONGO_PORT;
username = process.env.BAE_ENV_AK;
password = process.env.BAE_ENV_SK;
只要我修改为问题描述的那4行写死的代码,就一切正常。所以问题可能就出在数据库的设置上面,期待解决方法,谢谢大家。
rt
还有数据持久化这个框架不管的? 让用户自己选择?
why the fade has the same effect of push when i use the doRender(viewName,transition)?
eg:
env.onrender = function(doRender){
doRender('test', ['fade', 'z-index=-10']);
};
the code equals to this way.
env.onrender = function(doRender){
doRender('test', ['push','right ']);
};
直接访问 xxx.duapp.com就会出现下面这个错误,加上/index.html#/xxx 就不会有问题,请问这个是哪里配置的呢
Uncaught Can NOT find a controller []
The issue:
"NetworkError: 500 Internal Server Error - xxx.duapp.com/socket/info"
I often meet such a mistake , i don't know where is mistake.
如果可以,请问有什么需要注意的?
我直接将init的程序包上传到BAE,还是无法正常访问页面,看日志有这样一个错误,我按照教程填写了mongodb的name的
访问页面也提示:
Application Cache Error event: Resource fetch failed (404) http://goodaward.duapp.com/bin/view/itworks.html
这个是什么情况,我确定我的sumeru是最新的 0.7.14
FATAL:2013-07-17 11:27:38goodaward.duapp.com
--Error: database name cannot be the empty string
at validateDatabaseName (instance1/nodejs/goodaward.sx.duapp.com/app/node_modules/mongodb/lib/mongodb/db.js:195:39)
at new Db (instance1/nodejs/goodaward.sx.duapp.com/app/node_modules/mongodb/lib/mongodb/db.js:84:3)
at runnable (instance1/nodejs/goodaward.sx.duapp.com/app/sumeru/server/DbCollectionHandler.js:141:18)
at Object.<anonymous> (instance1/nodejs/goodaward.sx.duapp.com/app/sumeru/server/run.js:70:73)
at Module.wrappedCompile [as _compile] (instance1/nodejs/runtime/src/sandbox/modules/module.js:118:25)
at Object.Module._extensions..js (module.js:502:10)
at Module.load (module.js:392:32)
at Function.Module._load (module.js:350:12)
at Module.require (module.js:398:17)
at require (instance1/nodejs/runtime/src/sandbox/modules/module.js:42:15)
使用 sumeru init project 提示 sumeru command not found
我应该如何解决?
工程部署到BAE上面 无法显示
提示错误如下:
Failed to load resource: the server responded with a status of 404 (Not Found) http://myfriday.duapp.com/bin/sumeru.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://myfriday.duapp.com/bin/app.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://myfriday.duapp.com/bin/css/base.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://myfriday.duapp.com/bin/css/index.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://myfriday.duapp.com/bin/jquery.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://myfriday.duapp.com/bin/sumeru.js?cHVzaA=58205
Failed to load resource: the server responded with a status of 404 (Not Found) http://myfriday.duapp.com/bin/app.js
在bin文件夹下的css以及js找不到
在BAE的log上面显示的下面这一个FATAL
FATAL:2013-07-25 11:43:55myfriday.duapp.com
--Error: Cannot find module 'uglify-js'
at Function.Module._resolveFilename (module.js:375:15)
at Function.Module._load (module.js:318:25)
at Module.require (module.js:398:17)
at require (instance0/nodejs/runtime/src/sandbox/modules/module.js:42:15)
at module.exports (instance0/nodejs/myfriday.duapp.com/app/sumeru/build/buildJavascript.js:9:15)
at Object. (instance0/nodejs/myfriday.duapp.com/app/sumeru/build/build.js:45:51)
at Module.wrappedCompile as _compile
at Object.Module._extensions..js (module.js:502:10)
at Module.load (module.js:392:32)
at Function.Module._load (module.js:350:12)
在已经close掉的一个issue里面也发现了这样一个类似的问题
但是我按照答案的方法:更新sumeru 和 工程
但是都没办法解决
求解答!
sumeru开发的APP,浏览器首次加载较慢,就像卡一下,才出来一样。请问,这可以从哪几个方面优化
It's the method that redirect(queryPath,paramMap,isforce) override in the original web page when i use this method in my project. How to avoid this issue?
你好,在ubuntu下,按照教程创建项目后,运行sumeru start出现一下错误:
NON BAE MODE
BaseDir :/home/kevin/sumeru/myproject/
DstDir :/home/kevin/sumeru/myproject/app
/home/kevin/sumeru/myproject/sumeru/build/buildJavascript.js:73
var ast = UglifyJS.parse(orig_code); // parse code and get the initial AST
^
TypeError: Object function uglify(orig_code, options){
options || (options = {});
var jsp = uglify.parser;
var pro = uglify.uglify;
var ast = jsp.parse(orig_code, options.strict_semicolons); // parse code and get the initial AST
ast = pro.ast_mangle(ast, options.mangle_options); // get a new AST with mangled names
ast = pro.ast_squeeze(ast, options.squeeze_options); // get an AST with compression optimizations
var final_code = pro.gen_code(ast, options.gen_options); // compressed code here
return final_code;
} has no method 'parse'
at module.exports (/home/kevin/sumeru/myproject/sumeru/build/buildJavascript.js:73:24)
at Object. (/home/kevin/sumeru/myproject/sumeru/build/build.js:45:51)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/kevin/sumeru/myproject/sumeru/server/run.js:1:63)
at Module._compile (module.js:456:26)
For the step 12 of "Upload To BAE" doucment, I suggest removing this step by distinguishing the domain which start with *.duapp.com, and then automatically assign the correct URL to the variable.
sumeru.auth.register(token, password, info, callback);
我想问下,就是在使用这个函数的时候,该如何来实现回调函数的跳转到注册成功的主界面呢?(也可以给一个大概思路或者详细信息,谢谢!)
在本地测试的时候显示客户端和服务器端都验证通过。
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\asus>npm install -g sumeru
npm http GET https://registry.npmjs.org/sumeru
npm http 304 https://registry.npmjs.org/sumeru
npm http GET https://registry.npmjs.org/mkdirp/0.3.3
npm http GET https://registry.npmjs.org/mongodb/1.2.8
npm http GET https://registry.npmjs.org/shelljs/0.0.8
npm http GET https://registry.npmjs.org/uglify-js/2.3.4
npm http GET https://registry.npmjs.org/sockjs/0.3.5
npm http GET https://registry.npmjs.org/redis/0.8.2
npm http 304 https://registry.npmjs.org/mongodb/1.2.8
npm http 304 https://registry.npmjs.org/shelljs/0.0.8
npm http 304 https://registry.npmjs.org/uglify-js/2.3.4
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm http 304 https://registry.npmjs.org/mkdirp/0.3.3
npm http 304 https://registry.npmjs.org/sockjs/0.3.5
npm http 304 https://registry.npmjs.org/redis/0.8.2
npm http GET https://registry.npmjs.org/node-uuid/1.3.3
npm http GET https://registry.npmjs.org/faye-websocket/0.4.0
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/source-map
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/bson/0.1.5
npm http 304 https://registry.npmjs.org/node-uuid/1.3.3
npm http 304 https://registry.npmjs.org/faye-websocket/0.4.0
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] 'repositories' (plural) Not supported
.
npm WARN package.json Please pick one as the 'repository' field
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/source-map
npm http 304 https://registry.npmjs.org/bson/0.1.5
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/amdefine
[email protected] install C:\Users\asus\AppData\Roaming\npm\nodemodules\sumeru\node
modules\mongodb\node_modules\bson
node install.js || (exit 0)
= =
= Attempting to build bson c++ extension =
= Windows: no build will be attempted as binaries are prepackaged =
= Unix: on failure the package will still install without the C++ extension =
= =
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/amdefine
C:\Users\asus\AppData\Roaming\npm\sumeru -> C:\Users\asus\AppData\Roaming\npm\no
de_modules\sumeru\sumeru\npm-tools\sumeru
[email protected] C:\Users\asus\AppData\Roaming\npm\node_modules\sumeru
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected], [email protected])
C:\Users\asus>s
在第三步:创建Publish
在 app/publish 文件夹下, 新建文件 chatroom.js:
module.exports = function(fw){
fw.publish('chatroomModel', 'pub-chatRoom', function(callback){
var collection = this;
collection.find({}, {sort:[['time',1]]}, function(err, items){
callback(items);
});
},
...
};
推测问题所在:
新建文件名称chatroom.js与fw.publish中 'pub-chatRoom' 不相同
哪里说得不对,请指教
doc中mongdb和nodejs都是在windows环境下配置的,sumeru却在linux环境下安装,请问在windows下如何使用配置和使用sumeru?
My websit home page has a login button , then I want to click the button to jump the user login pages for auth-baidu-login . how to use the method?
sumeru.auth.baidu.login({
token: token,
password: value,
callback: callback,
verifyCode: code,
expires: 1000
});
在/app/server_config/site_url.js中,默认的配置如下:
sumeru.config({
site_url:"http://localhost:8080/" //with a tailing slash
});
默认情况下我通过localhost进行访问,没有问题,但如果我想改成如下的域名形式
sumeru.config({
site_url:"http://m.xxx.com" //m.xxx.com 指向了127.0.0.1
});
在/app/config/sumeru.js把httpServerPort的值也改回了80,理论上应该可以直接通过域名就能访问到本地项目啊,可是会出现以下异常:
感觉这不科学,我需要怎么样才能设置自定义的域名呢?谢谢!
采用sumeru框架开发了一个应用后,在本地运行都是正常的,安装文档上传到百度BAE后,访问页面,无法显示效果,还报了一个:
Uncaught TypeError: Object #<Object> has no method 'packages'
的错误,请帮忙看看
地址:http://goodaward.duapp.com/index.html#/tdmarquee
see tongyao/clouda#2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.