@caboodle-tech/node-simple-server 4.2.3 → 4.2.4

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/bin/nss.js +5 -5
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -283,7 +283,7 @@ With your new instance of NSS you can call any of the following public methods:
283
283
 
284
284
  - Send a message (`msg`) via WebSocket to the page that matches the `pageId`, or send to a page or pages that match the `pattern`.
285
285
 
286
- ### **printListeningAddresses(port, \[returnInstead = false\])**
286
+ ### **printListeningAddresses(\[returnInstead = false\])**
287
287
 
288
288
  - Prints a message to console with all the addresses the server is available at. If you want full control of the printing you can set `returnInstead` to `true`.
289
289
 
package/bin/nss.js CHANGED
@@ -44,7 +44,7 @@ class NodeSimpleServer {
44
44
  map: {}
45
45
  };
46
46
 
47
- #VERSION = '4.2.3';
47
+ #VERSION = '4.2.4';
48
48
 
49
49
  #watching = [];
50
50
 
@@ -377,16 +377,16 @@ class NodeSimpleServer {
377
377
  * Print the addresses the server is listening on to the console; this is useful for users who
378
378
  * are not sure what address to use to access the server.
379
379
  *
380
- * @param {int} port The port number being listened on.
381
380
  * @param {boolean} [returnInstead=false] If true the function will return the message string instead.
382
381
  */
383
382
  // eslint-disable-next-line consistent-return
384
- printListeningAddresses(port, returnInstead = false) {
383
+ printListeningAddresses(returnInstead = false) {
385
384
  let message = 'Node Simple Server live @:\n';
386
- const addresses = this.getAddresses(port);
385
+ const addresses = this.getAddresses(this.#OPS.port);
387
386
  addresses.forEach((address) => {
388
- message += ` ${address}`;
387
+ message += ` ${address}\n`;
389
388
  });
389
+ message += '\n';
390
390
 
391
391
  if (returnInstead) {
392
392
  return message;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caboodle-tech/node-simple-server",
3
- "version": "4.2.3",
3
+ "version": "4.2.4",
4
4
  "description": "Node Simple Server (NSS): A small but effective node based server for development sites, customizable live reloading, and websocket support built-in.",
5
5
  "main": "bin/nss.js",
6
6
  "scripts": {