juanp_1982
juanp_1982

Reputation: 1007

how client/server communication works with meteor/nodejs

I'm learning about Meteor. Right now I'm trying to figure out how the client/server communication works, I have a file under [root]/server with all the information to connect to DB (user, password, host, port) also I have the following line of code to test this "communication"

 var getUsers = function(name) {
           return "Hi. I'm " + name;
      };

and in my root folder I have:

console.log(getUsers("Juan!"));

however I'm getting "Uncaught ReferenceError: getUsers is not defined " error. so the question is, What I'm doing wrong????????

thanks in advance for any help or hint

Upvotes: 1

Views: 1382

Answers (1)

skozz
skozz

Reputation: 2720

Discover Meteor book have a great chapter about it:

I recommend you read the whole book, is very good.

Update:

This point of Meteor refence also explains very well the communication between methods, like server <> client communication. http://docs.meteor.com/#meteor_call

Upvotes: 3

Related Questions