You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an UI app on port 8001 and an app named contract on port 7001. I have 'cluster' installed and working. I have a subscription and insert method defined in 'contract' app.
'contract' server/app.js
Cluster.connect("mongodb://<username>:<passwd>@URL");varoptions={endpoint: "http://localhost:7001",balancer: "http://localhost:7001",// optionaluiService: "web"// (optional) read to the end for more info};Cluster.register("contracts",options);varContracts=newMeteor.Collection('contracts');Meteor.methods({addContract: addContract,findContracts: findContracts});Meteor.publish("getContracts",function(){returnContracts.find({});});functionaddContract(c){vardata={id: c.id,type: c.type};Contracts.insert(data);}functionfindContracts(){varcontracts=Contracts.find().fetch();returncontracts;}
I am accessing the methods from an angular controller in my UI app.
UI app server/app.js
Cluster.connect(mongodb://<username>:<passwd>@URL");
var options = {endpoint: "http://localhost:8001",balancer: "http://localhost:8001"// optional//uiService: "web" // (optional) read to the end for more info};
Cluster.register("web", options);
Cluster.allowPublicAccess("contracts");
I have an UI app on port 8001 and an app named contract on port 7001. I have 'cluster' installed and working. I have a subscription and insert method defined in 'contract' app.
'contract' server/app.js
I am accessing the methods from an angular controller in my UI app.
UI app server/app.js
UI app controller code
This is what is happening:
What am I doing wrong with my subscription?
Sudi
The text was updated successfully, but these errors were encountered: