Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

safe way to let WebStorm know 'runner' and 'webServer' ports #614

Closed
segrey opened this issue Jul 2, 2013 · 3 comments
Closed

safe way to let WebStorm know 'runner' and 'webServer' ports #614

segrey opened this issue Jul 2, 2013 · 3 comments

Comments

@segrey
Copy link
Contributor

segrey commented Jul 2, 2013

It's a feature request for WebStorm integration.

WebStorm needs to know webServerPort and runnerPort.
Now this information is mined from the standard output of Karma server:

INFO [karma]: Karma v0.9.4 server started at http://localhost:9876/
...
INFO [karma]: To run via this server, use "karma run --runner-port 9101"

Such approach seems to be unsafe.
For example, WebStorm integration isn't working if logLevel: config.LOG_DISABLE is set.

It'd be nice to have the following API on JavaScript level:

onRunnerPortBound(runnerPort)
onWebServerPortBound(webServerPort)

There functions should be called only once with really bounded ports.
config.runnerPort and config.port aren't what's needed. These ports are only initial port numbers. If a port cannot be bound, it's attempted to bind the port number increased by one and so on.

Thanks!

@segrey
Copy link
Contributor Author

segrey commented Jul 4, 2013

These events can be delivered by "globalEmitter":

globalEmitter.on('runner_port_bound', function(runnerPort) {
  // sending runner port to IDE
});
globalEmitter.on('web_server_port_bound', function(webServerPort) {
  // sending webServer port to IDE
});

@vojtajina
Copy link
Contributor

Just an update on this - the runnerPort is gone, there's only port now.

@dignifiedquire
Copy link
Member

Closing due to inactivity. Please feel free to reopen a new issue with updated info if this is still a problem. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants