1.3.1 • Published 2 years ago

@masx200/serve-cli v1.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

serve-cli

Description

A simple zero-configuration command-line static file server based on koa2.

支持范围请求,条件请求,内容压缩,跨域访问,添加 etag 头部

Installation

Globally via yarn

yarn global add @masx200/serve-cli

Running on-demand:

npx @masx200/serve-cli [options]

Examples

npx @masx200/serve-cli --help
serve-cli
usage: serve-cli [options]

options:
  --path,-pa       Path to folder [process.cwd()]
  --host,-h       Host to use [0.0.0.0]
  --port,-po       Port to use [4000]
  --ssl,-s        Enable https [false]
  --sslKey     Path to ssl key file [self-signed]
  --sslCert    Path to ssl cert file [self-signed]
  --help,-h       Print this list and exit

TLS/SSL

First, you need to make sure that openssl is installed correctly, and you have key.pem and cert.pem files.

Then you need to run the server with --ssl for enabling SSL and --sslKey=key.pem --sslCert=cert.pem for your certificate files.

1.3.1

2 years ago

1.3.0

2 years ago

1.2.1

2 years ago

1.2.0

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.1

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago