Skip to content

Notification on webserver port binding #1467

@segrey

Description

@segrey

Based on #614

WebStorm Karma integration listens to webserver port binding event (i.e. when this line printed https://github.com/karma-runner/karma/blob/v1.0.0-0/lib/server.js#L61).

Now the only way to accomplish this is to parse standard output of Karma server and mine data from lines like:

INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/

Such an approach seems to be not very safe, e.g. it'll fail if logLevel: config.LOG_DISABLE is set. Well, actually, there is a workaround for this case: LOG_DISABLE is not allowed https://github.com/karma-runner/karma-intellij/blob/master/lib/intellij.conf.js#L50. But still it doesn't feel right.

It'd be nice if plugins could use some API to listen to webserver port binding event. Thanks!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions