meteor

Iron router onBeforeActions is redirecting to startpage

这一生的挚爱 提交于 2020-02-06 03:47:29
问题 I use onBeforeActions to check if users are logged in, if their profile is incomplete or disabled. This seems to work correctly. But now the problem is whenever I directly go to a page within the app, I get redirected to startPage as well. I debugged and discovered 'user' is undefined, although I'm logged in. I use accounts-fb & -tw and account-ui packages. How can I make sure the user is logged in? I don't understand the correct timing of the functions.. edit: Locally I don't always seem to

Why are websockets disabled in the browser

谁说胖子不能爱 提交于 2020-02-05 12:43:26
问题 Meteor is awesome, but it looks like it uses long polling in the browser instead of real websockets. Meteor uses sockjs, right? Are sockets disabled explicitly? (read it somewhere here). what's the reason for it? Tanks a lot Andreas 回答1: Edit: Since Meteor 0.6.3.1 websockets are enabled by default in numerous browsers. Previous answer: For some reason I can't find the source (think it was on the mailinglist, but can't find it there), but from the top of my head: They are explictly disabled

4 level subscription nesting in meteor

。_饼干妹妹 提交于 2020-02-03 10:19:10
问题 I am using meteor and this is my schema, each is a separate collection: Courses has many lectures Lectures have many questions Questions have many answers I want 1 page where I can display a given course's lectures, questions, and answers. I can display a course's lectures no problem but I have issues with displaying further nested items. I'd ideally like to have: Lecture has courseId Answer has lectureId (but not courseId) Question has answerId (but not lectureId or courseId) Is that wise or

Meteor's email package attachment

只愿长相守 提交于 2020-02-02 11:01:07
问题 I'm poking around http://docs.meteor.com/#email . It's pretty easy to send flat emails, but how can an attachment be added? There's a comment in email.js:136 code: // XXX support attachments (once we have a client/server-compatible binary // Buffer class) Also Email uses MailComposer, which has method addAttachment(). Still it makes no sense about passing the attachment in Email.send() function. Any suggestions? 来源: https://stackoverflow.com/questions/23134657/meteors-email-package-attachment

Meteor's email package attachment

半城伤御伤魂 提交于 2020-02-02 10:58:05
问题 I'm poking around http://docs.meteor.com/#email . It's pretty easy to send flat emails, but how can an attachment be added? There's a comment in email.js:136 code: // XXX support attachments (once we have a client/server-compatible binary // Buffer class) Also Email uses MailComposer, which has method addAttachment(). Still it makes no sense about passing the attachment in Email.send() function. Any suggestions? 来源: https://stackoverflow.com/questions/23134657/meteors-email-package-attachment

Meteor / Jasmine / Velocity : how to test a server method requiring logged in user?

妖精的绣舞 提交于 2020-01-31 08:44:46
问题 Using velocity/jasmine, I'm a bit stuck on how I should test a server-side method requiring that there be a currently logged-in user. Is there a way to make Meteor think a user is logged in via stub/fake ? myServerSideModel.doThisServerSideThing = function(){ var user = Meteor.user(); if(!user) throw new Meteor.Error('403', 'not-autorized'); } Jasmine.onTest(function () { describe("doThisServerSideThing", function(){ it('should only work if user is logged in', function(){ // this only works

Why does audit-argument-checks raise an exception when all arguments seem checked?

爱⌒轻易说出口 提交于 2020-01-30 09:23:50
问题 Given the following method definition, Meteor.methods({ myMethod : function(foo) { //Checking the only argument check(foo, String) return true } }) The method is very simple but it will sometimes fail: Meteor.call('myMethod', 'foo', 'bar') //Exception : did not check all arguments What is happening? 回答1: audit-argument-checks does not make sure that you have check ed all arguments that you have defined, it makes sure that you have check ed all arguments that were passed. 1 Consider the

Eclipse中安装Spring

北城以北 提交于 2020-01-28 23:49:43
1.查看eclipse版本号 2.下载与版本对应插件(https://spring.io/tools3/sts/all) 3.在eclipse中添加插件 4.选择相关文件 5.重启eclipse(安装过程中只需要next即可,其中有一项需要点击同意) 6.查看是否安装成功(即是否出现下图选项) 来源: CSDN 作者: i_meteor_shower 链接: https://blog.csdn.net/i_meteor_shower/article/details/104102627

Meteor facebook login redirect doesn't work

家住魔仙堡 提交于 2020-01-26 03:12:20
问题 i'm using angular2 with meteor. ServiceConfiguration.configurations.insert({ service: "facebook", appId: 'myappID', loginStyle: "redirect", secret: 'mysecret', redirectUrl: 'http://localhost:3000/landing' }); after logging in it always goes back to the home page. (localhost:3000) my router code: export const routes: Route[] = [ { path: '', component: PartiesListComponent }, { path: 'login', component: LoginComponent }, { path: 'profile', component: ProfileComponent }, { path: 'landing',

Meteor - connect collections of multiple databases

一世执手 提交于 2020-01-25 21:10:34
问题 In Meteor (server side), is it possible to create collections of multiple databases? Let's say I want to connect to two different databases and mount their collections in meteor. My concern are collections with the same name in both databases (for example "users"). Is there any way to have 2 collections named "users" but from 2 different databases (connections)? Thanks! EDIT: The other question does not address my main issue: what if I want to mount (connect) two collections named "users"