Skip to content

Connecting to meteor server using ROOT_URL #91

@lpanger

Description

@lpanger

I have a local meteor instance running with the ROOT_URL set to http://localhost:3000/admin/. I can't seem to figure out the correct settings the DDP client should be set for this to work. Everything works when I remove the ROOT_URL environment variable.

var ddpClient = new DDP({
  host: 'localhost',
  port: 3000,
  //url: 'wss://localhost:3000/admin/websocket',
  //useSockJs: true,
  //ddpVersion: '1'
});

ddpClient.connect(function(error, wasReconnect) {
  if (error) {
    console.log('DDP connection error!');
    return;
  }

  console.log('connected!');
})

The commented out properties are different things I've tried without any success. What am I missing here? Note that I will be using the cluster package in the future so SockJS is required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions