@ramlmn/serv

0.8.0 • Public • Published

npm-badge travis-badge appveyor-badge

serv

Static file server with https, http2 (recommened only for development)

terminal.png

Installation

$ npm install --global @ramlmn/serv

Usage

  serv - Static file server with https and http2

  Usage
    Serve current directory

      $ serv

    Listen on port 8080 with compression

      $ serv --port 8080 --compress -d ./site/

    Listen over https with directory listing (uses self-signed certificates)

      $ serv --self-signed --listing

    Use specific SSL certificate and private key

      $ serv --ssl-cert ./cred.cert --ssl-key ./cred.key

  Options
    -h, --help             Shows this help text
    -p, --port             Port to listen on (default $PORT or 5000)
    -d, --dir              Path to directory
    -l, --listing          Enable directory listing
    -c, --compress         Enables compression (gzip)
    -s, --ssl              Use self-signed certificates (enables TLS/SSL)
    --ssl-cert             Path to SSL certificate file (enables TLS/SSL)
    --ssl-key              Path to SSL private key file (enables TLS/SSL)
    --http2                Use http2 (enables TLS/SSL)

Note: Currently no browser supports http2 without TLS, --http2 currently is worthy only when TLS/SSL is enabled (ref)

License

MIT

/@ramlmn/serv/

    Package Sidebar

    Install

    npm i @ramlmn/serv

    Weekly Downloads

    0

    Version

    0.8.0

    License

    MIT

    Unpacked Size

    23.7 kB

    Total Files

    10

    Last publish

    Collaborators

    • lmn
    • notlmn
    • r0mflip