Giter VIP home page Giter VIP logo

cloudajs's Issues

The issue of fade about the method -- doRender(viewName,transition)

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 ']);
};

controller跳转后 页面覆盖问题

我从 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

求解决..

部署到bae上日志没有什么提示,也运行不起来?

image
在本机上win8和ubuntu上我都试过了,还改了端口等,都可以使用。部署之后无法访问,也没有报什么错。不好发现问题。文档中的uploadtobae的介绍也看了好几遍,很多东西与最新的代码对应不上。求更新文档,或者讲解一下如何查看具体部署不成功的原因。谢谢。

请教一个取mongodb一条记录中类型为集合的字段的问题

我在本地定义了两个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上不行。
求解答。

sumeru 支持mac吗

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 =
= =

= This message will disappear when the default safe is set on the driver Db =

/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 是最新版本

Using auth.baidu.login , How to use the method?

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
});

访问路径问题 /bin/bin/view/itworks.html

直接下载的demo,运行时没有出现Welcome to sumeru!
看了看打印的日志:
file server accessing /tmp/sumeru-master/app/bin/bin/view/itworks.html
此处有两个bin,明显该路径有问题?是否这个原因造成的?

sumeru start失败

你好,在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)

Fix for IOS loading problem.

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.

【help】sumeru无法工作了

我也不知道做了什么操作导致的。目前sumeru命令完全无法使用了
现象,操作系统ubuntu 13.04:
caomu@caomu-Aspire:$ sumeru start
caomu@caomu-Aspire:
$ sumeru init ./myproject
caomu@caomu-Aspire:~$

就是打什么命令下去都是没有反应

Suggestions about Upload to BAE

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.

BAE发布问题

今天将本地测试通过的Todolist工程提交到BAE上做测试(已经按照https://github.com/brandnewera/sumeru/blob/master/docs/upload_to_BAE.md 这篇文章对工程配置进行更改),但发现打开http://testgc.duapp.com/ 后网页空白。查看网页源代码后发现此页引用的http://testgc.duapp.com/bin/sumeru.csshttp://testgc.duapp.com/bin/sumeru.jshttp://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 是可以找到的。

500 Internal Server Error

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.

sumeru提供的register方法注册问题

sumeru.auth.register(token, password, info, callback);

我想问下,就是在使用这个函数的时候,该如何来实现回调函数的跳转到注册成功的主界面呢?(也可以给一个大概思路或者详细信息,谢谢!)

在本地测试的时候显示客户端和服务器端都验证通过。

关于site_url的设置问题,怎么样配置域名在本地进行开发测试呢?

在/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,理论上应该可以直接通过域名就能访问到本地项目啊,可是会出现以下异常:
image

感觉这不科学,我需要怎么样才能设置自定义的域名呢?谢谢!

之前问题没有解决,问题被关闭,这里重发一下。

问题描述请看这里:#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行写死的代码,就一切正常。所以问题可能就出在数据库的设置上面,期待解决方法,谢谢大家。

工程部署到BAE无法显示

工程部署到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 和 工程
但是都没办法解决
求解答!

无法正常显示页面的问题

我直接将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如何做分页呢?

sumeru如何做分页呢?能否有demo,参考下,看文档不太懂,不知道怎么弄了使用sumeru.publishByPage与subscribeByPage。请指点。

[Help]App上传到BAE后数据库的配置问题

各位大神,我按所给的文档做了个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分别应该怎么样设置?这些值从哪里可以获取到?后台是否还需要其他额外的操作或者设置呢?

不胜感激,期待回复!

官网教程 跑不起来

在第三步:创建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' 不相同
哪里说得不对,请指教

npm install -g sumeru出错!求高手来解决啊

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.