1.0.3 • Published 6 years ago

@herokuro/noop-server v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
6 years ago

release ci coverage deps docs

style commit workflow license contrib


A really basic Node.js server to use in development and testing, when using Heroku.


Why noop-server?

  • 1.: ...
  • 2.: ...
  • 3.: ...

Installation

npm install @herokuro/noop-server --save

Usage - CLI

  • Run:

    $ noop-server
    $ noop-server port message
    $ noop-server [options]
  • Options:

    -h, --help      Print usage information.
    -p, --port      The port to use to run the server.
    -m, --message   The greeting text message to use by the server.
  • Examples:

    $ noop-server
      Starting server on...
      Another line
      
    $ noop-server 8080
      
    $ noop-server 8888 "My custom message."
      
    $ noop-server -p 8080
      
    $ noop-server -m "My custom message."
      
    $ noop-server -p 8080 -m "My custom message."
      x
      

Usage - API

NoopServer

The noop-server class.

Kind: global class

new NoopServer(port, message)

ParamTypeDescription
portnumberA nice port.
messagestringA nice message.

noopServer.port ⇒ number

Kind: instance property of NoopServer

noopServer.message ⇒ string

Kind: instance property of NoopServer

noopServer.start()

Starts the noop-server.

Kind: instance method of NoopServer

noopServer.stop() ⇒ Promise

Stops the noop-server.

Kind: instance method of NoopServer

NoopServer.DEFAULT_PORT : number

The default port number.

Kind: static constant of NoopServer
Default: 8080

NoopServer.DEFAULT_MESSAGE : string

The default message.

Kind: static constant of NoopServer
Default: "Hello there from noop-server!"

Contribution

Any contribution is highly appreciated. To get going, check out the contribution guidelines. Thank you and have fun!

License

ISC @ Richard King

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago