meteor

Meteor Npm-module client-side?

空扰寡人 提交于 2019-12-17 23:34:26
问题 Is it possible to use Npm-Modules on client-side? More specifically: I want to use node.js built-in crypto-module for encrypting a password the user enters and then send the encrypted password with a signature(/hmac) to my server. I need to do it that way, because I must be able to retrieve the original password server-side, because afterwards I'm going to send it to a ldap-server, because the user should authenticate with the same username/password he is registered with on that server. This

Where should Meteor.methods() be defined?

天大地大妈咪最大 提交于 2019-12-17 22:35:44
问题 http://docs.meteor.com/#meteor_methods I have tried it in publish.js in my server folder. I am successfully calling Meteor.apply and attempting the server call from the client. I always get an undefined response. 回答1: Calling Meteor.methods on the server is correct. That will define remote methods that run in the privileged environment and return results to the client. To return a normal result, just call return from your method function with some JSON value. To signal an error, throw a

Meteor pass data from client to server

混江龙づ霸主 提交于 2019-12-17 22:28:08
问题 I have a registration form, and when the user clicks the submit button the value in every textbox will be sent to server to insert that data, and return true/false. Client: Template.cust_register.events({ 'click button': function(){ var email = $('#tbxCustEmail').val(); var msg = $('#tbxCustMsg').val(); var isSuccess = insertMsg(email,msg); if(isSuccess){ alert("Success"); }else alert("Try again"); } }); Server: function insertMsg(email,msg){ Messages.insert({Email:email,Message:msg}); return

How to connect mongodb clients to local Meteor MongoDB

℡╲_俬逩灬. 提交于 2019-12-17 21:42:07
问题 How can I connect Robomongo (or any other mongodb client) to the mongodb instance that is created by my local Meteor application? 回答1: Ensure Meteor is running on localhost. Open a terminal window and run meteor command. It will start running on localhost:3000 if you have not changed to port. While it is running, open a separate terminal window and run meteor mongo command. This will open up a MongoDB shell and tell you what port it is connecting to This is normally 3001 as of version 0.7.1.1

Is it possible to generate dynamically-named MongoDB Collections?

徘徊边缘 提交于 2019-12-17 21:22:55
问题 Normally, MongoDB Collections are defined like this: DuckbilledPlatypi = new Mongo.Collection("duckbilledplatypi"); I want to, though, dynamically generate Collections based on user input. For example, I might want it to be: RupertPupkin20151212_20151218 = new Mongo.Collection("rupertPupkin20151212_20151218"); It would be easy enough to build up the Collection name: var dynCollName = username + begindate +'_'+ enddate; ...and then pass "dynCollName") to Mongo.Collection: = new Mongo

Meteor wrapAsync syntax

北慕城南 提交于 2019-12-17 20:37:04
问题 How do I use the Meteor wrapAsync? Below is what I am trying to do if (tempTreatment.groupId === undefined) { // create new group Meteor.wrapAsync(Meteor.call('createTreatmentGroup', salon, tempTreatment.groupName, tempTreatment.groupName)); // get group id var getGroup = Meteor.wrapAsync(Meteor.call('getTreatmentGroup', salon, tempTreatment.groupName)); console.log(getGroup); tempTreatment.groupId = getGroup._id; } I want to run these two Meteor.call functions synchronosly but I get

What does api.imply do?

馋奶兔 提交于 2019-12-17 20:34:37
问题 From the Meteor docs: Give users of this package access to another package (by passing in the string packagename ) or a collection of packages (by passing in an array of strings [packagename1, packagename2] ). I have no idea what it means. From this question I know that imply can be employed with use . What does api.imply do? What's exactly the difference between api.use and api.imply ? 回答1: api.use gives a package access to other packages exported symbols. For example you need to api.use(

Meteor with DataTables: Meteor._atFlush TypeError

依然范特西╮ 提交于 2019-12-17 20:27:15
问题 I'm trying to use DataTables (via mrt add datatables ) with Meteor. I've variously tried adding the $('#mytableid').dataTable() to the Meteor.subscribe callback, Meteor.autorun , Meteor.startup , and Template.mytemplate.rendered -- all resulting in the following exception and a No data available in table message. Any pointers? Exception from Meteor._atFlush: TypeError: Cannot call method 'insertBefore' of null at http://localhost:3000/packages/liverange/liverange.js

how to mongoimport data to deployed meteor app?

白昼怎懂夜的黑 提交于 2019-12-17 20:12:36
问题 UPDATE: this post applied to meteor.com free hosting, which has been shutdown and replaced with Galaxy, a paid Meteor hosting service I'm using this command C:\kanjifinder>meteor mongo --url kanjifinder.meteor.com to get access credentials to my deployed mongo app, but I can't get mongoimport to work with the credentials. I think I just don't exactly understand which part is the username , password and client . Could you break it down for me? result from server (I modified it to obfuscate the

Bootboxjs: how to render a Meteor template as dialog body

淺唱寂寞╮ 提交于 2019-12-17 19:52:30
问题 I have the following template: <template name="modalTest"> {{session "modalTestNumber"}} <button id="modalTestIncrement">Increment</button> </template> That session helper simply is a go-between with the Session object. I have that modalTestNumber initialized to 0 . I want this template to be rendered, with all of it's reactivity, into a bootbox modal dialog. I have the following event handler declared for this template: Template.modalTest.events({ 'click #modalTestIncrement': function(e, t)