miniserver

    1.0.3 • Public • Published

    miniserver

    Mini http server, serving static files.

    A server for developers and by developers.

    NPM version

    Installation

    $ npm install miniserver -g
    

    Quick Start

    To serve current directory:

    $ miniserver
    

    To serve specific folder:

    $ miniserver projects/dream
    

    To run on production mode:

    $ NODE_ENV=production miniserver projects/dream
    

    Features

    • Runs in cluster of processes to take advantage of multi-core systems
    • Directory listing as html/json/text (HTTP Accept) via serve-index
    • Access logs via morgan
    • cors support via cors
    • basic authentication via basic-auth
    • gzip compression via compression
    • Customizable via command line options
    • Development & Production modes via NODE_ENV environment variable - development or production

    Options

    • --port Port to use. Default is 8080 on development mode and 80 on production mode
    • --log or --no-log Enable or disable logging
    • --logformat morgan log format. Default is dev on development mode and compact on production mode.
    • --cors or --no-cors Enable or disable cors. Enabled in development mode
    • --compress or --no-compress Enable or disable compression. Disabled in development mode

    License

    MIT

    Install

    npm i miniserver

    DownloadsWeekly Downloads

    7

    Version

    1.0.3

    License

    MIT

    Last publish

    Collaborators

    • palanik