@manitoulin-transport/server-start

3.1.0 • Public • Published

server-start

Handle asynchronous initialization of a server

Features

  • Any option can be given as a Promise
  • Notifies any parent process with 'ready' event when initialization successfully completes, providing support for graceful start with pm2

Options

Name Description Default
server The server to initialize. Can be an instance of net.Server or any of it's child classes (http.Server, https.Server, etc.)
port The port to start listening on.
logFn Function to use for logging messages Instance of debug with the namespace '@manitoulin-transport/server-start'

TODO

  • Unit tests

Readme

Keywords

none

Package Sidebar

Install

npm i @manitoulin-transport/server-start

Weekly Downloads

5

Version

3.1.0

License

MIT

Last publish

Collaborators

  • manitoulin-transport