ultimate-express 1.2.27 → 1.2.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultimate-express",
3
- "version": "1.2.27",
3
+ "version": "1.2.28",
4
4
  "description": "The Ultimate Express. Fastest http server with full Express compatibility, based on uWebSockets.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -209,23 +209,20 @@ class Application extends Router {
209
209
  callback(this.port);
210
210
  };
211
211
  let fn = 'listen';
212
- let args = [port];
212
+ let args = [];
213
213
  if(typeof port !== 'number') {
214
214
  if(!isNaN(Number(port))) {
215
215
  port = Number(port);
216
- args.push(onListen);
216
+ args.push(port, onListen);
217
217
  if(host) {
218
218
  args.unshift(host);
219
219
  }
220
220
  } else {
221
221
  fn = 'listen_unix';
222
- args.unshift(onListen);
223
- if(host) {
224
- args.unshift(host);
225
- }
222
+ args.push(onListen, port);
226
223
  }
227
224
  } else {
228
- args.push(onListen);
225
+ args.push(port, onListen);
229
226
  }
230
227
  this.listenCalled = true;
231
228
  this.uwsApp[fn](...args);