crabatool 1.0.360 → 1.0.361
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/server.js +7 -2
- package/package.json +1 -1
package/lib/server.js
CHANGED
|
@@ -122,8 +122,13 @@ function createServer(app, options) {
|
|
|
122
122
|
port = options.port;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
var server = app.listen(
|
|
126
|
-
var
|
|
125
|
+
var server = app.listen(port, () => {
|
|
126
|
+
var port = server.address().port;
|
|
127
|
+
var url = 'http://127.0.0.1:' + port;
|
|
128
|
+
|
|
129
|
+
if (options && options.onRun) {
|
|
130
|
+
options.onRun(port);
|
|
131
|
+
}
|
|
127
132
|
|
|
128
133
|
if (config.virtualName) {
|
|
129
134
|
url += "/" + config.virtualName;
|