Server Address
Listen to a randomly available port and resolve URLs relative to the server address.
Installation
npm install server-address --save
Usage
;; const app = ;const server = app; // Listen to randomly available port.server; server; //=> "http://127.0.0.1:58933/foo" // Close the server connection.server;
Note: listen
and close
can optionally accept callback functions.
License
MIT license