# static-koa-server

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

Latest version **1.4.4** (published 2023-05-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install static-koa-server
pnpm add static-koa-server
yarn add static-koa-server
bun add static-koa-server
```

Provides the command `static-server`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.4 |
| Published | 2023-05-25 |
| First published | 2023-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 2 |
| Author | the-empty-book |
| Maintainers | the-empty-book |
| Keywords | static resource, dist, server, quick, command line tool |

## Links

- npm: https://www.npmjs.com/package/static-koa-server
- Repository: https://github.com/playDeath/static-server
- Homepage: https://github.com/playDeath/static-server#readme
- Issues: https://github.com/playDeath/static-server/issues
- npm.io page: https://npm.io/package/static-koa-server

## Dependencies (2)

- [koa](https://npm.io/package/koa.md) ^2.14.2
- [koa-static](https://npm.io/package/koa-static.md) ^5.0.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.4.4 (latest) — 2023-05-25
- 1.4.3 — 2023-05-23
- 1.4.2 — 2023-05-22
- 1.4.1 — 2023-05-20
- 1.4.0 — 2023-05-20
- 1.3.0 — 2023-05-20
- 1.2.0 — 2023-05-18
- 1.1.0 — 2023-05-18
- 1.0.0 — 2023-05-17

## README

# 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

```markdown
-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.

```js
module.exports = {
    responseHeaders: {
        'Cache-Control': 'max-age=2000'
    }
}
```

---
_Source: https://npm.io/package/static-koa-server · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
