Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 19 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,27 @@
[![NPM version](https://img.shields.io/npm/v/@fastify/static.svg?style=flat)](https://www.npmjs.com/package/@fastify/static)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/)

Plugin for serving static files as fast as possible. Supports Fastify version `4.x`.

| Fastify version | branch |
| --------------- | -------------------------------------------------------------------- |
| `^5.x` | This branch
| `^4.x` | [`v7.x`](https://github.com/fastify/fastify-static/tree/v7.x) |
| `^3.x` | [`v5.x`](https://github.com/fastify/fastify-static/tree/v5.x) |
| `^2.x` | [`2.x`](https://github.com/fastify/fastify-static/tree/2.x) |
| `^1.11.x` | [`1.x`](https://github.com/fastify/fastify-static/tree/1.x) |
Plugin for serving static files as fast as possible.

## Install
```
npm i @fastify/static
```

### Compatibility

| Plugin version | Fastify version |
| ---------------|-----------------|
| `^10.x` | `^5.x` |
| `^7.x` | `^4.x` |
| `^5.x` | `^3.x` |
| `^2.x` | `^2.x` |
| `^1.x` | `^1.x` |


`npm i @fastify/static`
Please note that if a Fastify version is out of support, then so are the corresponding version(s) of this plugin
in the table above.
See [Fastify's LTS policy](https://github.com/fastify/fastify/blob/main/docs/Reference/LTS.md) for more details.

## Usage

Expand Down Expand Up @@ -492,4 +500,4 @@ fastify.addHook('onSend', function (req, reply, payload, next) {

## License

Licensed under [MIT](./LICENSE)
Licensed under [MIT](./LICENSE).
Loading