1.4.4 • Published 2 years ago

static-koa-server v1.4.4

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

static-koa-server

a package can specify a folder as a local static resource server from the command line

Getting started

  • Install node.js
  • Install npm package globally npm -g install static-koa-server
  • Go to the folder you want to serve which has html file in dist
  • Run the server static-server

Options

-p, the port to listen to for incoming HTTP connections,
-o, open browser
-d, specifies a folder as the root path of the static resource server

Configuration File

You can create a file named static.config.js in the current directory where the command is executed to gain more capabilities through configuration information.

For example, you can use the responseHeaders property to configure the response headers of a static resource server.

module.exports = {
    responseHeaders: {
        'Cache-Control': 'max-age=2000'
    }
}
1.4.4

2 years ago

1.4.3

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago