0

I know a way to get connection information is this.connection but this works at server-side, which requires context of server side. Some help at here, but could not find the solution. As explained here, Collection is shared both at client and server-side which is confusing me in how to get the server context or connection information at Meteor-Collection as I have used some methods in it.

Community
  • 1
  • 1
user3765023
  • 77
  • 10

1 Answers1

0

You may want to wrap your code to ensure it's running on the server, something like:

if (Meteor.isServer) {
    console.log(this.connection)
}
Anthony Astige
  • 1,919
  • 1
  • 13
  • 18