# koa-serve-static

> Serve static files for koa

Latest version **1.0.0** (published 2015-11-24) · MIT license · 0 weekly downloads

## Install

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

## 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.0.0 |
| Published | 2015-11-24 |
| First published | 2015-04-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 4 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Fangdun Cai |
| Maintainers | fundon |
| Keywords | serve, static |

## Links

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

## Dependencies (1)

- [serve-static](https://npm.io/package/serve-static.md) ^1.x

## Recent versions

- 1.0.0 (latest) — 2015-11-24
- 1.0.0-alpha.1 — 2015-11-22
- 0.0.1 — 2015-04-02

## README

# koa-serve-static

> Serve static files for koa.  
> [serve-static] wrapper for koa's middleware.

[![NPM version][npm-img]][npm-url]
[![Build status][travis-img]][travis-url]
[![Test coverage][coveralls-img]][coveralls-url]
[![License][license-img]][license-url]
[![Dependency status][david-img]][david-url]

## Install

```sh
$ npm install --save koa-serve-static
```

## Usage

### **=1.x** 100%, working with `koa-v2`

```js
const koa = require('koa');
const serveStatic = require('koa-serve-static');
const app = new Koa();

app.use(serveStatic(root, options));
```

### **<1.x**

```js
var koa = require('koa');
var serveStatic = require('koa-serve-static');
var app = koa();

app.use(serveStatic(root, options));
```

[npm-img]: https://img.shields.io/npm/v/koa-serve-static.svg?style=flat-square
[npm-url]: https://npmjs.org/package/koa-serve-static
[travis-img]: https://img.shields.io/travis/koa-modules/serve-static.svg?style=flat-square
[travis-url]: https://travis-ci.org/koa-modules/serve-static
[coveralls-img]: https://img.shields.io/coveralls/koa-modules/serve-static.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/koa-modules/serve-static?branch=master
[license-img]: https://img.shields.io/badge/license-MIT-green.svg?style=flat-square
[license-url]: LICENSE
[david-img]: https://img.shields.io/david/koa-modules/serve-static.svg?style=flat-square
[david-url]: https://david-dm.org/koa-modules/serve-static
[serve-static]: https://github.com/expressjs/serve-static

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