fastify 3.24.1 → 3.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/docs/{Benchmarking.md → Guides/Benchmarking.md} +14 -5
- package/docs/Guides/Ecosystem.md +508 -0
- package/docs/{Fluent-Schema.md → Guides/Fluent-Schema.md} +16 -7
- package/docs/{Getting-Started.md → Guides/Getting-Started.md} +162 -60
- package/docs/Guides/Index.md +30 -4
- package/docs/{Migration-Guide-V3.md → Guides/Migration-Guide-V3.md} +43 -37
- package/docs/{Plugins-Guide.md → Guides/Plugins-Guide.md} +196 -82
- package/docs/{Recommendations.md → Guides/Recommendations.md} +17 -10
- package/docs/{Serverless.md → Guides/Serverless.md} +84 -49
- package/docs/Guides/Style-Guide.md +246 -0
- package/docs/{Testing.md → Guides/Testing.md} +25 -11
- package/docs/Guides/Write-Plugin.md +102 -0
- package/docs/{ContentTypeParser.md → Reference/ContentTypeParser.md} +68 -30
- package/docs/{Decorators.md → Reference/Decorators.md} +52 -47
- package/docs/{Encapsulation.md → Reference/Encapsulation.md} +3 -3
- package/docs/{Errors.md → Reference/Errors.md} +77 -47
- package/docs/{HTTP2.md → Reference/HTTP2.md} +13 -13
- package/docs/{Hooks.md → Reference/Hooks.md} +148 -69
- package/docs/Reference/Index.md +71 -0
- package/docs/{LTS.md → Reference/LTS.md} +31 -32
- package/docs/{Lifecycle.md → Reference/Lifecycle.md} +15 -7
- package/docs/{Logging.md → Reference/Logging.md} +47 -29
- package/docs/Reference/Middleware.md +78 -0
- package/docs/{Plugins.md → Reference/Plugins.md} +91 -34
- package/docs/{Reply.md → Reference/Reply.md} +195 -97
- package/docs/{Request.md → Reference/Request.md} +32 -16
- package/docs/{Routes.md → Reference/Routes.md} +243 -113
- package/docs/{Server.md → Reference/Server.md} +516 -267
- package/docs/{TypeScript.md → Reference/TypeScript.md} +447 -187
- package/docs/{Validation-and-Serialization.md → Reference/Validation-and-Serialization.md} +178 -86
- package/docs/index.md +24 -0
- package/fastify.js +1 -1
- package/lib/decorate.js +6 -3
- package/lib/route.js +1 -1
- package/package.json +7 -2
- package/test/constrained-routes.test.js +220 -0
- package/test/custom-parser.test.js +11 -2
- package/test/decorator.test.js +24 -0
- package/test/handler-context.test.js +11 -4
- package/test/http2/closing.test.js +14 -5
- package/test/listen.test.js +36 -22
- package/test/request-error.test.js +2 -8
- package/test/router-options.test.js +10 -1
- package/test/stream.test.js +14 -3
- package/test/trust-proxy.test.js +15 -7
- package/test/types/instance.test-d.ts +46 -1
- package/types/instance.d.ts +6 -1
- package/docs/Ecosystem.md +0 -213
- package/docs/Middleware.md +0 -53
- package/docs/Style-Guide.md +0 -185
- package/docs/Write-Plugin.md +0 -58
package/README.md
CHANGED
|
@@ -146,7 +146,7 @@ fastify.listen(3000, (err, address) => {
|
|
|
146
146
|
})
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
Do you want to know more? Head to the <a href="./docs/Getting-Started.md"><code><b>Getting Started</b></code></a>.
|
|
149
|
+
Do you want to know more? Head to the <a href="./docs/Guides/Getting-Started.md"><code><b>Getting Started</b></code></a>.
|
|
150
150
|
|
|
151
151
|
|
|
152
152
|
### Fastify v1.x and v2.x
|
|
@@ -189,11 +189,11 @@ depends on your application, you should __always__ benchmark if performance
|
|
|
189
189
|
matters to you.
|
|
190
190
|
|
|
191
191
|
## Documentation
|
|
192
|
-
* <a href="./docs/Getting-Started.md"><code><b>Getting Started</b></code></a>
|
|
192
|
+
* <a href="./docs/Guides/Getting-Started.md"><code><b>Getting Started</b></code></a>
|
|
193
193
|
* <a href="./docs/Guides/Index.md"><code><b>Guides</b></code></a>
|
|
194
|
-
* <a href="./docs/Server.md"><code><b>Server</b></code></a>
|
|
194
|
+
* <a href="./docs/Reference/Server.md"><code><b>Server</b></code></a>
|
|
195
195
|
* <a href="./docs/Routes.md"><code><b>Routes</b></code></a>
|
|
196
|
-
* <a href="./docs/Encapsulation.md"><code><b>Encapsulation</b></code></a>
|
|
196
|
+
* <a href="./docs/Reference/Encapsulation.md"><code><b>Encapsulation</b></code></a>
|
|
197
197
|
* <a href="./docs/Logging.md"><code><b>Logging</b></code></a>
|
|
198
198
|
* <a href="./docs/Middleware.md"><code><b>Middleware</b></code></a>
|
|
199
199
|
* <a href="./docs/Hooks.md"><code><b>Hooks</b></code></a>
|
|
@@ -251,6 +251,7 @@ Team members are listed in alphabetical order.
|
|
|
251
251
|
* [__Rafael Gonzaga__](https://github.com/rafaelgss), <https://twitter.com/_rafaelgss>, <https://www.npmjs.com/~rafaelgss>
|
|
252
252
|
* [__Vincent Le Goff__](https://github.com/zekth)
|
|
253
253
|
* [__Luciano Mammino__](https://github.com/lmammino), <https://twitter.com/loige>, <https://www.npmjs.com/~lmammino>
|
|
254
|
+
* [__Luis Orbaiceta__](https://github.com/luisorbaiceta), <https://twitter.com/luisorbai>, <https://www.npmjs.com/~luisorbaiceta>
|
|
254
255
|
* [__Maksim Sinik__](https://github.com/fox1t), <https://twitter.com/maksimsinik>, <https://www.npmjs.com/~fox1t>
|
|
255
256
|
* [__Manuel Spigolon__](https://github.com/eomm), <https://twitter.com/manueomm>, <https://www.npmjs.com/~eomm>
|
|
256
257
|
* [__James Sumners__](https://github.com/jsumners), <https://twitter.com/jsumners79>, <https://www.npmjs.com/~jsumners>
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
<h1 align="center">Fastify</h1>
|
|
2
2
|
|
|
3
3
|
## Benchmarking
|
|
4
|
-
Benchmarking is important if you want to measure how a change can affect the
|
|
4
|
+
Benchmarking is important if you want to measure how a change can affect the
|
|
5
|
+
performance of your application. We provide a simple way to benchmark your
|
|
6
|
+
application from the point of view of a user and contributor. The setup allows
|
|
7
|
+
you to automate benchmarks in different branches and on different Node.js
|
|
8
|
+
versions.
|
|
5
9
|
|
|
6
10
|
The modules we will use:
|
|
7
|
-
- [Autocannon](https://github.com/mcollina/autocannon): A HTTP/1.1 benchmarking
|
|
8
|
-
|
|
9
|
-
- [
|
|
10
|
-
|
|
11
|
+
- [Autocannon](https://github.com/mcollina/autocannon): A HTTP/1.1 benchmarking
|
|
12
|
+
tool written in node.
|
|
13
|
+
- [Branch-comparer](https://github.com/StarpTech/branch-comparer): Checkout
|
|
14
|
+
multiple git branches, execute scripts and log the results.
|
|
15
|
+
- [Concurrently](https://github.com/kimmobrunfeldt/concurrently): Run commands
|
|
16
|
+
concurrently.
|
|
17
|
+
- [Npx](https://github.com/npm/npx): NPM package runner used to run scripts
|
|
18
|
+
against different Node.js Versions and to execute local binaries. Shipped with
|
|
19
|
+
npm@5.2.0.
|
|
11
20
|
|
|
12
21
|
## Simple
|
|
13
22
|
|
|
@@ -0,0 +1,508 @@
|
|
|
1
|
+
<h1 align="center">Fastify</h1>
|
|
2
|
+
|
|
3
|
+
## Ecosystem
|
|
4
|
+
|
|
5
|
+
Plugins maintained by the Fastify team are listed under [Core](#core) while
|
|
6
|
+
plugins maintained by the community are listed in the [Community](#community)
|
|
7
|
+
section.
|
|
8
|
+
|
|
9
|
+
#### [Core](#core)
|
|
10
|
+
|
|
11
|
+
- [`fastify-accepts`](https://github.com/fastify/fastify-accepts) to have
|
|
12
|
+
[accepts](https://www.npmjs.com/package/accepts) in your request object.
|
|
13
|
+
- [`fastify-accepts-serializer`](https://github.com/fastify/fastify-accepts-serializer)
|
|
14
|
+
to serialize to output according to `Accept` header.
|
|
15
|
+
- [`fastify-auth`](https://github.com/fastify/fastify-auth) Run multiple auth
|
|
16
|
+
functions in Fastify.
|
|
17
|
+
- [`fastify-autoload`](https://github.com/fastify/fastify-autoload) Require all
|
|
18
|
+
plugins in a directory.
|
|
19
|
+
- [`fastify-awilix`](https://github.com/fastify/fastify-awilix) Dependency
|
|
20
|
+
injection support for Fastify, based on
|
|
21
|
+
[awilix](https://github.com/jeffijoe/awilix).
|
|
22
|
+
- [`fastify-bankai`](https://github.com/fastify/fastify-bankai)
|
|
23
|
+
[Bankai](https://github.com/yoshuawuyts/bankai) assets compiler for Fastify.
|
|
24
|
+
- [`fastify-basic-auth`](https://github.com/fastify/fastify-basic-auth) Basic
|
|
25
|
+
auth plugin for Fastify.
|
|
26
|
+
- [`fastify-bearer-auth`](https://github.com/fastify/fastify-bearer-auth) Bearer
|
|
27
|
+
auth plugin for Fastify.
|
|
28
|
+
- [`fastify-caching`](https://github.com/fastify/fastify-caching) General
|
|
29
|
+
server-side cache and ETag support.
|
|
30
|
+
- [`fastify-circuit-breaker`](https://github.com/fastify/fastify-circuit-breaker)
|
|
31
|
+
A low overhead circuit breaker for your routes.
|
|
32
|
+
- [`fastify-compress`](https://github.com/fastify/fastify-compress) Fastify
|
|
33
|
+
compression utils.
|
|
34
|
+
- [`fastify-cookie`](https://github.com/fastify/fastify-cookie) Parse and set
|
|
35
|
+
cookie headers.
|
|
36
|
+
- [`fastify-cors`](https://github.com/fastify/fastify-cors) Enables the use of
|
|
37
|
+
CORS in a Fastify application.
|
|
38
|
+
- [`fastify-csrf`](https://github.com/fastify/fastify-csrf) A plugin for adding
|
|
39
|
+
[CSRF](https://en.wikipedia.org/wiki/Cross-site_request_forgery) protection to
|
|
40
|
+
Fastify.
|
|
41
|
+
- [`fastify-diagnostics-channel`](https://github.com/fastify/fastify-diagnostics-channel)
|
|
42
|
+
Plugin to deal with `diagnostics_channel` on Fastify
|
|
43
|
+
- [`fastify-elasticsearch`](https://github.com/fastify/fastify-elasticsearch)
|
|
44
|
+
Plugin to share the same ES client.
|
|
45
|
+
- [`fastify-env`](https://github.com/fastify/fastify-env) Load and check
|
|
46
|
+
configuration.
|
|
47
|
+
- [`fastify-etag`](https://github.com/fastify/fastify-etag) Automatically
|
|
48
|
+
generate ETags for HTTP responses.
|
|
49
|
+
- [`fastify-flash`](https://github.com/fastify/fastify-flash) Set and get flash
|
|
50
|
+
messages using the session.
|
|
51
|
+
- [`fastify-formbody`](https://github.com/fastify/fastify-formbody) Plugin to
|
|
52
|
+
parse x-www-form-urlencoded bodies.
|
|
53
|
+
- [`fastify-funky`](https://github.com/fastify/fastify-funky) Makes functional
|
|
54
|
+
programming in Fastify more convenient. Adds support for Fastify routes
|
|
55
|
+
returning functional structures, such as Either, Task or plain parameterless
|
|
56
|
+
function.
|
|
57
|
+
- [`fastify-helmet`](https://github.com/fastify/fastify-helmet) Important
|
|
58
|
+
security headers for Fastify.
|
|
59
|
+
- [`fastify-http-proxy`](https://github.com/fastify/fastify-http-proxy) Proxy
|
|
60
|
+
your HTTP requests to another server, with hooks.
|
|
61
|
+
- [`fastify-jwt`](https://github.com/fastify/fastify-jwt) JWT utils for Fastify,
|
|
62
|
+
internally uses [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken).
|
|
63
|
+
- [`fastify-leveldb`](https://github.com/fastify/fastify-leveldb) Plugin to
|
|
64
|
+
share a common LevelDB connection across Fastify.
|
|
65
|
+
- [`fastify-mongodb`](https://github.com/fastify/fastify-mongodb) Fastify
|
|
66
|
+
MongoDB connection plugin, with which you can share the same MongoDB
|
|
67
|
+
connection pool across every part of your server.
|
|
68
|
+
- [`fastify-multipart`](https://github.com/fastify/fastify-multipart) Multipart
|
|
69
|
+
support for Fastify.
|
|
70
|
+
- [`fastify-oauth2`](https://github.com/fastify/fastify-oauth2) Wrap around
|
|
71
|
+
[`simple-oauth2`](https://github.com/lelylan/simple-oauth2).
|
|
72
|
+
- [`fastify-postgres`](https://github.com/fastify/fastify-postgres) Fastify
|
|
73
|
+
PostgreSQL connection plugin, with this you can share the same PostgreSQL
|
|
74
|
+
connection pool in every part of your server.
|
|
75
|
+
- [`fastify-rate-limit`](https://github.com/fastify/fastify-rate-limit) A low
|
|
76
|
+
overhead rate limiter for your routes.
|
|
77
|
+
- [`fastify-request-context`](https://github.com/fastify/fastify-request-context)
|
|
78
|
+
Request-scoped storage, based on
|
|
79
|
+
[AsyncLocalStorage](https://nodejs.org/api/async_hooks.html#async_hooks_class_asynclocalstorage)
|
|
80
|
+
(with fallback to [cls-hooked](https://github.com/Jeff-Lewis/cls-hooked)),
|
|
81
|
+
providing functionality similar to thread-local storages.
|
|
82
|
+
- [`fastify-response-validation`](https://github.com/fastify/fastify-response-validation)
|
|
83
|
+
A simple plugin that enables response validation for Fastify.
|
|
84
|
+
- [`fastify-nextjs`](https://github.com/fastify/fastify-nextjs) React
|
|
85
|
+
server-side rendering support for Fastify with
|
|
86
|
+
[Next](https://github.com/zeit/next.js/).
|
|
87
|
+
- [`fastify-redis`](https://github.com/fastify/fastify-redis) Fastify Redis
|
|
88
|
+
connection plugin, with which you can share the same Redis connection across
|
|
89
|
+
every part of your server.
|
|
90
|
+
- [`fastify-reply-from`](https://github.com/fastify/fastify-reply-from) Plugin
|
|
91
|
+
to forward the current HTTP request to another server.
|
|
92
|
+
- [`fastify-routes`](https://github.com/fastify/fastify-routes) Plugin that
|
|
93
|
+
provides a `Map` of routes.
|
|
94
|
+
- [`fastify-schedule`](https://github.com/fastify/fastify-schedule) Plugin for
|
|
95
|
+
scheduling periodic jobs, based on
|
|
96
|
+
[toad-scheduler](https://github.com/kibertoad/toad-scheduler).
|
|
97
|
+
- [`fastify-sensible`](https://github.com/fastify/fastify-sensible) Defaults for
|
|
98
|
+
Fastify that everyone can agree on. It adds some useful decorators such as
|
|
99
|
+
HTTP errors and assertions, but also more request and reply methods.
|
|
100
|
+
- [`@fastify/session`](https://github.com/fastify/session) a session plugin for
|
|
101
|
+
Fastify.
|
|
102
|
+
- [`fastify-static`](https://github.com/fastify/fastify-static) Plugin for
|
|
103
|
+
serving static files as fast as possible.
|
|
104
|
+
- [`fastify-swagger`](https://github.com/fastify/fastify-swagger) Plugin for
|
|
105
|
+
serving Swagger/OpenAPI documentation for Fastify, supporting dynamic
|
|
106
|
+
generation.
|
|
107
|
+
- [`fastify-websocket`](https://github.com/fastify/fastify-websocket) WebSocket
|
|
108
|
+
support for Fastify. Built upon [ws](https://github.com/websockets/ws).
|
|
109
|
+
- [`fastify-url-data`](https://github.com/fastify/fastify-url-data) Decorate the
|
|
110
|
+
`Request` object with a method to access raw URL components.
|
|
111
|
+
- [`middie`](https://github.com/fastify/middie) Middleware engine for Fastify.
|
|
112
|
+
- [`point-of-view`](https://github.com/fastify/point-of-view) Templates
|
|
113
|
+
rendering (_ejs, pug, handlebars, marko_) plugin support for Fastify.
|
|
114
|
+
- [`under-pressure`](https://github.com/fastify/under-pressure) Measure process
|
|
115
|
+
load with automatic handling of _"Service Unavailable"_ plugin for Fastify.
|
|
116
|
+
|
|
117
|
+
#### [Community](#community)
|
|
118
|
+
|
|
119
|
+
- [`@applicazza/fastify-nextjs`](https://github.com/applicazza/fastify-nextjs)
|
|
120
|
+
Alternate Fastify and Next.js integration.
|
|
121
|
+
- [`@coobaha/typed-fastify`](https://github.com/Coobaha/typed-fastify) Strongly
|
|
122
|
+
typed routes with a runtime validation using JSON schema generated from types.
|
|
123
|
+
- [`@dnlup/fastify-doc`](https://github.com/dnlup/fastify-doc) A plugin for
|
|
124
|
+
sampling process metrics.
|
|
125
|
+
- [`@dnlup/fastify-traps`](https://github.com/dnlup/fastify-traps) A plugin to
|
|
126
|
+
close the server gracefully on `SIGINT` and `SIGTERM` signals.
|
|
127
|
+
- [`@gquittet/graceful-server`](https://github.com/gquittet/graceful-server)
|
|
128
|
+
Tiny (~5k), Fast, KISS, and dependency-free Node.JS library to make your
|
|
129
|
+
Fastify API graceful.
|
|
130
|
+
- [`@immobiliarelabs/fastify-metrics`](https://github.com/immobiliare/fastify-metrics)
|
|
131
|
+
Minimalistic and opinionated plugin that collects usage/process metrics and
|
|
132
|
+
dispatches to [statsd](https://github.com/statsd/statsd).
|
|
133
|
+
- [`@mgcrea/fastify-graceful-exit`](https://github.com/mgcrea/fastify-graceful-exit)
|
|
134
|
+
A plugin to close the server gracefully
|
|
135
|
+
- [`@mgcrea/fastify-request-logger`](https://github.com/mgcrea/fastify-request-logger)
|
|
136
|
+
A plugin to enable compact request logging for Fastify
|
|
137
|
+
- [`@mgcrea/fastify-session-redis-store`](https://github.com/mgcrea/fastify-session-redis-store)
|
|
138
|
+
Redis store for @mgcrea/fastify-session using ioredis
|
|
139
|
+
- [`@mgcrea/fastify-session-sodium-crypto`](https://github.com/mgcrea/fastify-session-sodium-crypto)
|
|
140
|
+
Fast sodium-based crypto for @mgcrea/fastify-session
|
|
141
|
+
- [`@mgcrea/fastify-session`](https://github.com/mgcrea/fastify-session) Session
|
|
142
|
+
plugin for Fastify that supports both stateless and stateful sessions
|
|
143
|
+
- [`@mgcrea/pino-pretty-compact`](https://github.com/mgcrea/pino-pretty-compact)
|
|
144
|
+
A custom compact pino-base prettifier
|
|
145
|
+
- [`@trubavuong/fastify-seaweedfs`](https://github.com/trubavuong/fastify-seaweedfs)
|
|
146
|
+
SeaweedFS for Fastify
|
|
147
|
+
- [`apollo-server-fastify`](https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-fastify)
|
|
148
|
+
Run an [Apollo Server](https://github.com/apollographql/apollo-server) to
|
|
149
|
+
serve GraphQL with Fastify.
|
|
150
|
+
- [`arecibo`](https://github.com/nucleode/arecibo) Fastify ping responder for
|
|
151
|
+
Kubernetes Liveness and Readiness Probes.
|
|
152
|
+
- [`cls-rtracer`](https://github.com/puzpuzpuz/cls-rtracer) Fastify middleware
|
|
153
|
+
for CLS-based request ID generation. An out-of-the-box solution for adding
|
|
154
|
+
request IDs into your logs.
|
|
155
|
+
- [`fastify-405`](https://github.com/Eomm/fastify-405) Fastify plugin that adds
|
|
156
|
+
405 HTTP status to your routes
|
|
157
|
+
- [`fastify-allow`](https://github.com/mattbishop/fastify-allow) Fastify plugin
|
|
158
|
+
that automatically adds an Allow header to responses with routes. Also sends
|
|
159
|
+
405 responses for routes that have a handler but not for the request's method.
|
|
160
|
+
- [`fastify-amqp`](https://github.com/RafaelGSS/fastify-amqp) Fastify AMQP
|
|
161
|
+
connection plugin, to use with RabbitMQ or another connector. Just a wrapper
|
|
162
|
+
to [`amqplib`](https://github.com/squaremo/amqp.node).
|
|
163
|
+
- [`fastify-angular-universal`](https://github.com/exequiel09/fastify-angular-universal)
|
|
164
|
+
Angular server-side rendering support using
|
|
165
|
+
[`@angular/platform-server`](https://github.com/angular/angular/tree/master/packages/platform-server)
|
|
166
|
+
for Fastify
|
|
167
|
+
- [`fastify-api-key`](https://github.com/arkerone/fastify-api-key) Fastify
|
|
168
|
+
plugin to authenticate HTTP requests based on api key and signature
|
|
169
|
+
- [`fastify-appwrite`](https://github.com/Dev-Manny/fastify-appwrite) Fastify
|
|
170
|
+
Plugin for interacting with Appwrite server.
|
|
171
|
+
- [`fastify-auth0-verify`](https://github.com/nearform/fastify-auth0-verify):
|
|
172
|
+
Auth0 verification plugin for Fastify, internally uses
|
|
173
|
+
[fastify-jwt](https://npm.im/fastify-jwt) and
|
|
174
|
+
[jsonwebtoken](https://npm.im/jsonwebtoken).
|
|
175
|
+
- [`fastify-autocrud`](https://github.com/paranoiasystem/fastify-autocrud)
|
|
176
|
+
Plugin to auto-generate CRUD routes as fast as possible.
|
|
177
|
+
- [`fastify-autoroutes`](https://github.com/GiovanniCardamone/fastify-autoroutes)
|
|
178
|
+
Plugin to scan and load routes based on filesystem path from a custom
|
|
179
|
+
directory.
|
|
180
|
+
- [`fastify-axios`](https://github.com/davidedantonio/fastify-axios) Plugin to
|
|
181
|
+
send HTTP requests via [axios](https://github.com/axios/axios).
|
|
182
|
+
- [`fastify-babel`](https://github.com/cfware/fastify-babel) Fastify plugin for
|
|
183
|
+
development servers that require Babel transformations of JavaScript sources.
|
|
184
|
+
- [`fastify-bcrypt`](https://github.com/heply/fastify-bcrypt) A Bcrypt hash
|
|
185
|
+
generator & checker.
|
|
186
|
+
- [`fastify-blipp`](https://github.com/PavelPolyakov/fastify-blipp) Prints your
|
|
187
|
+
routes to the console, so you definitely know which endpoints are available.
|
|
188
|
+
- [`fastify-bookshelf`](https://github.com/butlerx/fastify-bookshelfjs) Fastify
|
|
189
|
+
plugin to add [bookshelf.js](https://bookshelfjs.org/) ORM support.
|
|
190
|
+
- [`fastify-boom`](https://github.com/jeromemacias/fastify-boom) Fastify plugin
|
|
191
|
+
to add [boom](https://github.com/hapijs/boom) support.
|
|
192
|
+
- [`fastify-bree`](https://github.com/climba03003/fastify-bree) Fastify plugin
|
|
193
|
+
to add [bree](https://github.com/breejs/bree) support.
|
|
194
|
+
- [`fastify-casbin`](https://github.com/nearform/fastify-casbin) Casbin support
|
|
195
|
+
for Fastify.
|
|
196
|
+
- [`fastify-casbin-rest`](https://github.com/nearform/fastify-casbin-rest)
|
|
197
|
+
Casbin support for Fastify based on a RESTful model.
|
|
198
|
+
- [`fastify-casl`](https://github.com/Inlecom/fastify-casl) Fastify
|
|
199
|
+
[CASL](https://github.com/stalniy/casl) plugin that supports ACL-like
|
|
200
|
+
protection of endpoints via either a preSerialization & preHandler hook,
|
|
201
|
+
sanitizing the inputs and outputs of your application based on user rights.
|
|
202
|
+
- [`fastify-cloudevents`](https://github.com/smartiniOnGitHub/fastify-cloudevents)
|
|
203
|
+
Fastify plugin to generate and forward Fastify events in the Cloudevents
|
|
204
|
+
format.
|
|
205
|
+
- [`fastify-cockroachdb`](https://github.com/alex-ppg/fastify-cockroachdb)
|
|
206
|
+
Fastify plugin to connect to a CockroachDB PostgreSQL instance via the
|
|
207
|
+
Sequelize ORM.
|
|
208
|
+
- [`fastify-couchdb`](https://github.com/nigelhanlon/fastify-couchdb) Fastify
|
|
209
|
+
plugin to add CouchDB support via [nano](https://github.com/apache/nano).
|
|
210
|
+
- [`fastify-crud-generator`](https://github.com/heply/fastify-crud-generator) A
|
|
211
|
+
plugin to rapidly generate CRUD routes for any entity.
|
|
212
|
+
- [`fastify-custom-healthcheck`](https://github.com/gkampitakis/fastify-custom-healthcheck)
|
|
213
|
+
Fastify plugin to add health route in your server that asserts custom
|
|
214
|
+
functions.
|
|
215
|
+
- [`fastify-decorators`](https://github.com/L2jLiga/fastify-decorators) Fastify
|
|
216
|
+
plugin that provides the set of TypeScript decorators.
|
|
217
|
+
- [`fastify-disablecache`](https://github.com/Fdawgs/fastify-disablecache)
|
|
218
|
+
Fastify plugin to disable client-side caching, inspired by
|
|
219
|
+
[nocache](https://github.com/helmetjs/nocache).
|
|
220
|
+
- [`fastify-dynamodb`](https://github.com/matrus2/fastify-dynamodb) AWS DynamoDB
|
|
221
|
+
plugin for Fastify. It exposes
|
|
222
|
+
[AWS.DynamoDB.DocumentClient()](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html)
|
|
223
|
+
object.
|
|
224
|
+
- [`fastify-dynareg`](https://github.com/greguz/fastify-dynareg) Dynamic plugin
|
|
225
|
+
register for Fastify.
|
|
226
|
+
- [`fastify-early-hints`](https://github.com/zekth/fastify-early-hints) Plugin
|
|
227
|
+
to add HTTP 103 feature based on [RFC
|
|
228
|
+
8297](https://httpwg.org/specs/rfc8297.html)
|
|
229
|
+
- [`fastify-envalid`](https://github.com/alemagio/fastify-envalid) Fastify
|
|
230
|
+
plugin to integrate [envalid](https://github.com/af/envalid) in your Fastify
|
|
231
|
+
project.
|
|
232
|
+
- [`fastify-error-page`](https://github.com/hemerajs/fastify-error-page) Fastify
|
|
233
|
+
plugin to print errors in structured HTML to the browser.
|
|
234
|
+
- [`fastify-esso`](https://github.com/patrickpissurno/fastify-esso) The easiest
|
|
235
|
+
authentication plugin for Fastify, with built-in support for Single sign-on
|
|
236
|
+
(and great documentation).
|
|
237
|
+
- [`fastify-explorer`](https://github.com/Eomm/fastify-explorer) Get control of
|
|
238
|
+
your decorators across all the encapsulated contexts.
|
|
239
|
+
- [`fastify-favicon`](https://github.com/smartiniOnGitHub/fastify-favicon)
|
|
240
|
+
Fastify plugin to serve default favicon.
|
|
241
|
+
- [`fastify-feature-flags`](https://gitlab.com/m03geek/fastify-feature-flags)
|
|
242
|
+
Fastify feature flags plugin with multiple providers support (e.g. env,
|
|
243
|
+
[config](https://lorenwest.github.io/node-config/),
|
|
244
|
+
[unleash](https://unleash.github.io/)).
|
|
245
|
+
- [`fastify-file-upload`](https://github.com/huangang/fastify-file-upload)
|
|
246
|
+
Fastify plugin for uploading files.
|
|
247
|
+
- [`fastify-firebase`](https://github.com/now-ims/fastify-firebase) Fastify
|
|
248
|
+
plugin for [Firebase Admin SDK](https://firebase.google.com/docs/admin/setup)
|
|
249
|
+
to Fastify so you can easily use Firebase Auth, Firestore, Cloud Storage,
|
|
250
|
+
Cloud Messaging, and more.
|
|
251
|
+
- [`fastify-firebase-auth`](https://github.com/oxsav/fastify-firebase-auth)
|
|
252
|
+
Firebase Authentication for Fastify supporting all of the methods relating to
|
|
253
|
+
the authentication API.
|
|
254
|
+
- [`fastify-formidable`](https://github.com/climba03003/fastify-formidable)
|
|
255
|
+
Handy plugin to provide multipart support and fastify-swagger integration.
|
|
256
|
+
- [`fastify-gcloud-trace`](https://github.com/mkinoshi/fastify-gcloud-trace)
|
|
257
|
+
[Google Cloud Trace API](https://cloud.google.com/trace/docs/reference)
|
|
258
|
+
Connector for Fastify.
|
|
259
|
+
- [`fastify-get-head`](https://github.com/MetCoder95/fastify-get-head) Small
|
|
260
|
+
plugin to set a new HEAD route handler for each GET route previously
|
|
261
|
+
registered in Fastify.
|
|
262
|
+
- [`fastify-good-sessions`](https://github.com/Phara0h/fastify-good-sessions) A
|
|
263
|
+
good Fastify sessions plugin focused on speed.
|
|
264
|
+
- [`fastify-google-cloud-storage`](https://github.com/carlozamagni/fastify-google-cloud-storage)
|
|
265
|
+
Fastify plugin that exposes a GCP Cloud Storage client instance.
|
|
266
|
+
- [`fastify-grant`](https://github.com/simov/fastify-grant)
|
|
267
|
+
Authentication/Authorization plugin for Fastify that supports 200+ OAuth
|
|
268
|
+
Providers.
|
|
269
|
+
- [`fastify-guard`](https://github.com/hsynlms/fastify-guard) A Fastify plugin
|
|
270
|
+
that protects endpoints by checking authenticated user roles and/or scopes.
|
|
271
|
+
- [`fastify-graceful-shutdown`](https://github.com/hemerajs/fastify-graceful-shutdown)
|
|
272
|
+
Shutdown Fastify gracefully and asynchronously.
|
|
273
|
+
- [`fastify-hasura`](https://github.com/ManUtopiK/fastify-hasura) A Fastify
|
|
274
|
+
plugin to have fun with [Hasura](https://github.com/hasura/graphql-engine).
|
|
275
|
+
- [`fastify-healthcheck`](https://github.com/smartiniOnGitHub/fastify-healthcheck)
|
|
276
|
+
Fastify plugin to serve a health check route and a probe script.
|
|
277
|
+
- [`fastify-hemera`](https://github.com/hemerajs/fastify-hemera) Fastify Hemera
|
|
278
|
+
plugin, for writing reliable & fault-tolerant microservices with
|
|
279
|
+
[nats.io](https://nats.io/).
|
|
280
|
+
- [`fastify-http-context`](https://github.com/thorough-developer/fastify-http-context)
|
|
281
|
+
Fastify plugin for "simulating" a thread of execution to allow for true HTTP
|
|
282
|
+
context to take place per API call within the Fastify lifecycle of calls.
|
|
283
|
+
- [`fastify-http2https`](https://github.com/lolo32/fastify-http2https) Redirect
|
|
284
|
+
HTTP requests to HTTPS, both using the same port number, or different response
|
|
285
|
+
on HTTP and HTTPS.
|
|
286
|
+
- [`fastify-http-client`](https://github.com/kenuyx/fastify-http-client) Plugin
|
|
287
|
+
to send HTTP(s) requests. Built upon
|
|
288
|
+
[urllib](https://github.com/node-modules/urllib).
|
|
289
|
+
- [`fastify-http-errors-enhanced`](https://github.com/ShogunPanda/fastify-http-errors-enhanced)
|
|
290
|
+
An error handling plugin for Fastify that uses enhanced HTTP errors.
|
|
291
|
+
- [`fastify-https-redirect`](https://github.com/tomsvogel/fastify-https-redirect)
|
|
292
|
+
Fastify plugin for auto-redirect from HTTP to HTTPS.
|
|
293
|
+
- [`fastify-influxdb`](https://github.com/alex-ppg/fastify-influxdb) Fastify
|
|
294
|
+
InfluxDB plugin connecting to an InfluxDB instance via the Influx default
|
|
295
|
+
package.
|
|
296
|
+
- [`fastify-jwt-authz`](https://github.com/Ethan-Arrowood/fastify-jwt-authz) JWT
|
|
297
|
+
user scope verifier.
|
|
298
|
+
- [`fastify-jwt-webapp`](https://github.com/charlesread/fastify-jwt-webapp) JWT
|
|
299
|
+
authentication for Fastify-based web apps.
|
|
300
|
+
- [`fastify-knexjs`](https://github.com/chapuletta/fastify-knexjs) Fastify
|
|
301
|
+
plugin for support KnexJS Query Builder.
|
|
302
|
+
- [`fastify-knexjs-mock`](https://github.com/chapuletta/fastify-knexjs-mock)
|
|
303
|
+
Fastify Mock KnexJS for testing support.
|
|
304
|
+
- [`fastify-kubernetes`](https://github.com/greguz/fastify-kubernetes) Fastify
|
|
305
|
+
Kubernetes client plugin.
|
|
306
|
+
- [`fastify-language-parser`](https://github.com/lependu/fastify-language-parser)
|
|
307
|
+
Fastify plugin to parse request language.
|
|
308
|
+
- [`fastify-loader`](https://github.com/TheNoim/fastify-loader) Load routes from
|
|
309
|
+
a directory and inject the Fastify instance in each file.
|
|
310
|
+
- [`fastify-lured`](https://github.com/lependu/fastify-lured) Plugin to load lua
|
|
311
|
+
scripts with [fastify-redis](https://github.com/fastify/fastify-redis) and
|
|
312
|
+
[lured](https://github.com/enobufs/lured).
|
|
313
|
+
- [`fastify-mailer`](https://github.com/coopflow/fastify-mailer) Plugin to
|
|
314
|
+
initialize and encapsulate [Nodemailer](https://nodemailer.com)'s transporters
|
|
315
|
+
instances in Fastify.
|
|
316
|
+
- [`fastify-markdown`](https://github.com/freezestudio/fastify-markdown) Plugin
|
|
317
|
+
to markdown support.
|
|
318
|
+
- [`fastify-method-override`](https://github.com/corsicanec82/fastify-method-override)
|
|
319
|
+
Plugin for Fastify, which allows the use of HTTP verbs, such as DELETE, PATCH,
|
|
320
|
+
HEAD, PUT, OPTIONS in case the client doesn't support them.
|
|
321
|
+
- [`fastify-metrics`](https://gitlab.com/m03geek/fastify-metrics) Plugin for
|
|
322
|
+
exporting [Prometheus](https://prometheus.io) metrics.
|
|
323
|
+
- [`fastify-minify`](https://github.com/Jelenkee/fastify-minify) Plugin for
|
|
324
|
+
minification and transformation of responses.
|
|
325
|
+
- [`fastify-mongo-memory`](https://github.com/chapuletta/fastify-mongo-memory)
|
|
326
|
+
Fastify MongoDB in Memory Plugin for testing support.
|
|
327
|
+
- [`fastify-mongoose-api`](https://github.com/jeka-kiselyov/fastify-mongoose-api)
|
|
328
|
+
Fastify plugin to create REST API methods based on Mongoose MongoDB models.
|
|
329
|
+
- [`fastify-mongoose-driver`](https://github.com/alex-ppg/fastify-mongoose)
|
|
330
|
+
Fastify Mongoose plugin that connects to a MongoDB via the Mongoose plugin
|
|
331
|
+
with support for Models.
|
|
332
|
+
- [`fastify-msgpack`](https://github.com/kenriortega/fastify-msgpack) Fastify
|
|
333
|
+
and MessagePack, together at last. Uses @msgpack/msgpack by default.
|
|
334
|
+
- [`fastify-multer`](https://github.com/fox1t/fastify-multer) Multer is a plugin
|
|
335
|
+
for handling multipart/form-data, which is primarily used for uploading files.
|
|
336
|
+
- [`fastify-nats`](https://github.com/mahmed8003/fastify-nats) Plugin to share
|
|
337
|
+
[NATS](https://nats.io) client across Fastify.
|
|
338
|
+
- [`fastify-no-additional-properties`](https://github.com/greguz/fastify-no-additional-properties)
|
|
339
|
+
Add `additionalProperties: false` by default to your JSON Schemas.
|
|
340
|
+
- [`fastify-no-icon`](https://github.com/jsumners/fastify-no-icon) Plugin to
|
|
341
|
+
eliminate thrown errors for `/favicon.ico` requests.
|
|
342
|
+
- [`fastify-nodemailer`](https://github.com/lependu/fastify-nodemailer) Plugin
|
|
343
|
+
to share [nodemailer](https://nodemailer.com) transporter across Fastify.
|
|
344
|
+
- [`fastify-normalize-request-reply`](https://github.com/ericrglass/fastify-normalize-request-reply)
|
|
345
|
+
Plugin to normalize the request and reply to the Express version 4.x request
|
|
346
|
+
and response, which allows use of middleware, like swagger-stats, that was
|
|
347
|
+
originally written for Express.
|
|
348
|
+
- [`fastify-now`](https://github.com/yonathan06/fastify-now) Structure your
|
|
349
|
+
endpoints in a folder and load them dynamically with Fastify.
|
|
350
|
+
- [`fastify-nuxtjs`](https://github.com/gomah/fastify-nuxtjs) Vue server-side
|
|
351
|
+
rendering support for Fastify with Nuxt.js Framework.
|
|
352
|
+
- [`fastify-oas`](https://gitlab.com/m03geek/fastify-oas) Generates OpenAPI 3.0+
|
|
353
|
+
documentation from routes schemas for Fastify.
|
|
354
|
+
- [`fastify-objectionjs`](https://github.com/jarcodallo/fastify-objectionjs)
|
|
355
|
+
Plugin for the Fastify framework that provides integration with objectionjs
|
|
356
|
+
ORM.
|
|
357
|
+
- [`fastify-objectionjs-classes`](https://github.com/kamikazechaser/fastify-objectionjs-classes)
|
|
358
|
+
Plugin to cherry-pick classes from objectionjs ORM.
|
|
359
|
+
- [`fastify-openapi-docs`](https://github.com/ShogunPanda/fastify-openapi-docs)
|
|
360
|
+
A Fastify plugin that generates OpenAPI spec automatically.
|
|
361
|
+
- [`fastify-openapi-glue`](https://github.com/seriousme/fastify-openapi-glue)
|
|
362
|
+
Glue for OpenAPI specifications in Fastify, autogenerates routes based on an
|
|
363
|
+
OpenAPI Specification.
|
|
364
|
+
- [`fastify-opentelemetry`](https://github.com/autotelic/fastify-opentelemetry)
|
|
365
|
+
A Fastify plugin that uses the [OpenTelemetry
|
|
366
|
+
API](https://github.com/open-telemetry/opentelemetry-js-api) to provide
|
|
367
|
+
request tracing.
|
|
368
|
+
- [`fastify-oracle`](https://github.com/cemremengu/fastify-oracle) Attaches an
|
|
369
|
+
[`oracledb`](https://github.com/oracle/node-oracledb) connection pool to a
|
|
370
|
+
Fastify server instance.
|
|
371
|
+
- [`fastify-orientdb`](https://github.com/mahmed8003/fastify-orientdb) Fastify
|
|
372
|
+
OrientDB connection plugin, with which you can share the OrientDB connection
|
|
373
|
+
across every part of your server.
|
|
374
|
+
- [`fastify-piscina`](https://github.com/piscinajs/fastify-piscina) A worker
|
|
375
|
+
thread pool plugin using [Piscina](https://github.com/piscinajs/piscina).
|
|
376
|
+
- [`fastify-peekaboo`](https://github.com/simone-sanfratello/fastify-peekaboo)
|
|
377
|
+
Fastify plugin for memoize responses by expressive settings.
|
|
378
|
+
- [`fastify-polyglot`](https://github.com/heply/fastify-polyglot) A plugin to
|
|
379
|
+
handle i18n using
|
|
380
|
+
[node-polyglot](https://www.npmjs.com/package/node-polyglot).
|
|
381
|
+
- [`fastify-postgraphile`](https://github.com/alemagio/fastify-postgraphile)
|
|
382
|
+
Plugin to integrate [PostGraphile](https://www.graphile.org/postgraphile/) in
|
|
383
|
+
a Fastify project.
|
|
384
|
+
- [`fastify-prettier`](https://github.com/hsynlms/fastify-prettier) A Fastify
|
|
385
|
+
plugin that uses [prettier](https://github.com/prettier/prettier) under the
|
|
386
|
+
hood to beautify outgoing responses and/or other things in the Fastify server.
|
|
387
|
+
- [`fastify-print-routes`](https://github.com/ShogunPanda/fastify-print-routes)
|
|
388
|
+
A Fastify plugin that prints all available routes.
|
|
389
|
+
- [`fastify-protobufjs`](https://github.com/kenriortega/fastify-protobufjs)
|
|
390
|
+
Fastify and protobufjs, together at last. Uses protobufjs by default.
|
|
391
|
+
- [`fastify-qrcode`](https://github.com/chonla/fastify-qrcode) This plugin
|
|
392
|
+
utilizes [qrcode](https://github.com/soldair/node-qrcode) to generate QR Code.
|
|
393
|
+
- [`fastify-qs`](https://github.com/webdevium/fastify-qs) A plugin for Fastify
|
|
394
|
+
that adds support for parsing URL query parameters with
|
|
395
|
+
[qs](https://github.com/ljharb/qs).
|
|
396
|
+
- [`fastify-raw-body`](https://github.com/Eomm/fastify-raw-body) Add the
|
|
397
|
+
`request.rawBody` field.
|
|
398
|
+
- [`fastify-rbac`](https://gitlab.com/m03geek/fastify-rbac) Fastify role-based
|
|
399
|
+
access control plugin.
|
|
400
|
+
- [`fastify-recaptcha`](https://github.com/qwertyforce/fastify-recaptcha)
|
|
401
|
+
Fastify plugin for recaptcha verification.
|
|
402
|
+
- [`fastify-redis-channels`](https://github.com/hearit-io/fastify-redis-channels)
|
|
403
|
+
A plugin for fast, reliable, and scalable channels implementation based on
|
|
404
|
+
Redis streams.
|
|
405
|
+
- [`fastify-register-routes`](https://github.com/israeleriston/fastify-register-routes)
|
|
406
|
+
Plugin to automatically load routes from a specified path and optionally limit
|
|
407
|
+
loaded file names by a regular expression.
|
|
408
|
+
- [`fastify-response-time`](https://github.com/lolo32/fastify-response-time) Add
|
|
409
|
+
`X-Response-Time` header at each request for Fastify, in milliseconds.
|
|
410
|
+
- [`fastify-response-caching`](https://github.com/codeaholicguy/fastify-response-caching)
|
|
411
|
+
A Fastify plugin for caching the response.
|
|
412
|
+
- [`fastify-resty`](https://github.com/FastifyResty/fastify-resty) Fastify-based
|
|
413
|
+
web framework with REST API routes auto-generation for TypeORM entities using
|
|
414
|
+
DI and decorators.
|
|
415
|
+
- [`fastify-reverse-routes`](https://github.com/dimonnwc3/fastify-reverse-routes)
|
|
416
|
+
Fastify reverse routes plugin, allows to defined named routes and build path
|
|
417
|
+
using name and parameters.
|
|
418
|
+
- [`fastify-rob-config`](https://github.com/jeromemacias/fastify-rob-config)
|
|
419
|
+
Fastify Rob-Config integration.
|
|
420
|
+
- [`fastify-route-group`](https://github.com/TakNePoidet/fastify-route-group)
|
|
421
|
+
Convenient grouping and inheritance of routes
|
|
422
|
+
- [`fastify-schema-constraint`](https://github.com/Eomm/fastify-schema-constraint)
|
|
423
|
+
Choose the JSON schema to use based on request parameters.
|
|
424
|
+
- [`fastify-schema-to-typescript`](https://github.com/thomasthiebaud/fastify-schema-to-typescript)
|
|
425
|
+
Generate typescript types based on your JSON/YAML validation schemas so they
|
|
426
|
+
are always in sync.
|
|
427
|
+
- [`fastify-secure-session`](https://github.com/mcollina/fastify-secure-session)
|
|
428
|
+
Create a secure stateless cookie session for Fastify.
|
|
429
|
+
- [`fastify-sentry`](https://github.com/alex-ppg/fastify-sentry) Fastify plugin
|
|
430
|
+
to add the Sentry SDK error handler to requests.
|
|
431
|
+
- [`fastify-sequelize`](https://github.com/lyquocnam/fastify-sequelize) Fastify
|
|
432
|
+
plugin work with Sequelize (adapter for NodeJS -> Sqlite, Mysql, Mssql,
|
|
433
|
+
Postgres).
|
|
434
|
+
- [`fastify-server-session`](https://github.com/jsumners/fastify-server-session)
|
|
435
|
+
A session plugin with support for arbitrary backing caches via
|
|
436
|
+
`fastify-caching`.
|
|
437
|
+
- [`fastify-slonik`](https://github.com/Unbuttun/fastify-slonik) Fastify Slonik
|
|
438
|
+
plugin, with this you can use slonik in every part of your server.
|
|
439
|
+
- [`fastify-soap-client`](https://github.com/fastify/fastify-soap-client) a SOAP
|
|
440
|
+
client plugin for Fastify.
|
|
441
|
+
- [`fastify-socket.io`](https://github.com/alemagio/fastify-socket.io) a
|
|
442
|
+
Socket.io plugin for Fastify.
|
|
443
|
+
- [`fastify-sse`](https://github.com/lolo32/fastify-sse) to provide Server-Sent
|
|
444
|
+
Events with `reply.sse( … )` to Fastify.
|
|
445
|
+
- [`fastify-sse-v2`](https://github.com/nodefactoryio/fastify-sse-v2) to provide
|
|
446
|
+
Server-Sent Events using Async Iterators (supports newer versions of Fastify).
|
|
447
|
+
- [`fastify-stripe`](https://github.com/coopflow/fastify-stripe) Plugin to
|
|
448
|
+
initialize and encapsulate [Stripe
|
|
449
|
+
Node.js](https://github.com/stripe/stripe-node) instances in Fastify.
|
|
450
|
+
- [`fastify-supabase`](https://github.com/coopflow/fastify-supabase) Plugin to
|
|
451
|
+
initialize and encapsulate [Supabase](https://github.com/supabase/supabase-js)
|
|
452
|
+
instances in Fastify.
|
|
453
|
+
- [`fastify-tls-keygen`](https://gitlab.com/sebdeckers/fastify-tls-keygen)
|
|
454
|
+
Automatically generate a browser-compatible, trusted, self-signed,
|
|
455
|
+
localhost-only, TLS certificate.
|
|
456
|
+
- [`fastify-tokenize`](https://github.com/Bowser65/fastify-tokenize)
|
|
457
|
+
[Tokenize](https://github.com/Bowser65/Tokenize) plugin for Fastify that
|
|
458
|
+
removes the pain of managing authentication tokens, with built-in integration
|
|
459
|
+
for `fastify-auth`.
|
|
460
|
+
- [`fastify-totp`](https://github.com/heply/fastify-totp) A plugin to handle
|
|
461
|
+
TOTP (e.g. for 2FA).
|
|
462
|
+
- [`fastify-twitch-ebs-tools`](https://github.com/lukemnet/fastify-twitch-ebs-tools)
|
|
463
|
+
Useful functions for Twitch Extension Backend Services (EBS).
|
|
464
|
+
- [`fastify-typeorm-plugin`](https://github.com/inthepocket/fastify-typeorm-plugin)
|
|
465
|
+
Fastify plugin to work with TypeORM.
|
|
466
|
+
- [`fastify-vhost`](https://github.com/patrickpissurno/fastify-vhost) Proxy
|
|
467
|
+
subdomain HTTP requests to another server (useful if you want to point
|
|
468
|
+
multiple subdomains to the same IP address, while running different servers on
|
|
469
|
+
the same machine).
|
|
470
|
+
- [`fastify-vite`](https://github.com/galvez/fastify-vite)
|
|
471
|
+
[Vite](https://vitejs.dev/) plugin for Fastify with SSR data support.
|
|
472
|
+
- [`fastify-vue-plugin`](https://github.com/TheNoim/fastify-vue)
|
|
473
|
+
[Nuxt.js](https://nuxtjs.org) plugin for Fastify. Control the routes nuxt
|
|
474
|
+
should use.
|
|
475
|
+
- [`fastify-wamp-router`](https://github.com/lependu/fastify-wamp-router) Web
|
|
476
|
+
Application Messaging Protocol router for Fastify.
|
|
477
|
+
- [`fast-water`](https://github.com/tswayne/fast-water) A Fastify plugin for
|
|
478
|
+
waterline. Decorates Fastify with waterline models.
|
|
479
|
+
- [`fastify-webpack-hmr`](https://github.com/lependu/fastify-webpack-hmr)
|
|
480
|
+
Webpack hot module reloading plugin for Fastify.
|
|
481
|
+
- [`fastify-ws`](https://github.com/gj/fastify-ws) WebSocket integration for
|
|
482
|
+
Fastify — with support for WebSocket lifecycle hooks instead of a single
|
|
483
|
+
handler function. Built upon [ws](https://github.com/websockets/ws) and
|
|
484
|
+
[uws](https://github.com/uNetworking/uWebSockets).
|
|
485
|
+
- [`fastify-xml-body-parser`](https://github.com/NaturalIntelligence/fastify-xml-body-parser)
|
|
486
|
+
Parse XML payload / request body into JS / JSON object.
|
|
487
|
+
- [`fastify-xray`](https://github.com/jeromemacias/fastify-xray) Fastify plugin
|
|
488
|
+
for AWS XRay recording.
|
|
489
|
+
- [`i18next-http-middleware`](https://github.com/i18next/i18next-http-middleware#fastify-usage)
|
|
490
|
+
An [i18next](https://www.i18next.com) based i18n (internationalization)
|
|
491
|
+
middleware to be used with Node.js web frameworks like Express or Fastify and
|
|
492
|
+
also for Deno.
|
|
493
|
+
- [`k-fastify-gateway`](https://github.com/jkyberneees/fastify-gateway) API
|
|
494
|
+
Gateway plugin for Fastify, a low footprint implementation that uses the
|
|
495
|
+
`fastify-reply-from` HTTP proxy library.
|
|
496
|
+
- [`mercurius`](https://mercurius.dev/) A fully-featured and performant GraphQL
|
|
497
|
+
server implementation for Fastify.
|
|
498
|
+
- [`nstats`](https://github.com/Phara0h/nstats) A fast and compact way to get
|
|
499
|
+
all your network and process stats for your node application. Websocket,
|
|
500
|
+
HTTP/S, and prometheus compatible!
|
|
501
|
+
- [`oas-fastify`](https://github.com/ahmadnassri/node-oas-fastify) OAS 3.x to
|
|
502
|
+
Fastify routes automation. Automatically generates route handlers with fastify
|
|
503
|
+
configuration and validation.
|
|
504
|
+
- [`openapi-validator-middleware`](https://github.com/PayU/openapi-validator-middleware#fastify)
|
|
505
|
+
Swagger and OpenAPI 3.0 spec-based request validation middleware that supports
|
|
506
|
+
Fastify.
|
|
507
|
+
- [`sequelize-fastify`](https://github.com/hsynlms/sequelize-fastify) A simple
|
|
508
|
+
and lightweight Sequelize plugin for Fastify.
|
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
## Fluent Schema
|
|
4
4
|
|
|
5
|
-
The [Validation and
|
|
5
|
+
The [Validation and
|
|
6
|
+
Serialization](/docs/Reference/Validation-and-Serialization.md) documentation
|
|
7
|
+
outlines all parameters accepted by Fastify to set up JSON Schema Validation to
|
|
8
|
+
validate the input, and JSON Schema Serialization to optimize the output.
|
|
6
9
|
|
|
7
|
-
[`fluent-json-schema`](https://github.com/fastify/fluent-json-schema) can be
|
|
10
|
+
[`fluent-json-schema`](https://github.com/fastify/fluent-json-schema) can be
|
|
11
|
+
used to simplify this task while allowing the reuse of constants.
|
|
8
12
|
|
|
9
13
|
### Basic settings
|
|
10
14
|
|
|
@@ -51,9 +55,12 @@ fastify.post('/the/url', { schema }, handler)
|
|
|
51
55
|
|
|
52
56
|
### Reuse
|
|
53
57
|
|
|
54
|
-
With `fluent-json-schema` you can manipulate your schemas more easily and
|
|
55
|
-
thanks to the `addSchema()` method. You can
|
|
56
|
-
|
|
58
|
+
With `fluent-json-schema` you can manipulate your schemas more easily and
|
|
59
|
+
programmatically and then reuse them thanks to the `addSchema()` method. You can
|
|
60
|
+
refer to the schema in two different manners that are detailed in the
|
|
61
|
+
[Validation and
|
|
62
|
+
Serialization](./Validation-and-Serialization.md#adding-a-shared-schema)
|
|
63
|
+
documentation.
|
|
57
64
|
|
|
58
65
|
Here are some usage examples:
|
|
59
66
|
|
|
@@ -85,7 +92,8 @@ fastify.post('/the/url', { schema }, handler)
|
|
|
85
92
|
```
|
|
86
93
|
|
|
87
94
|
|
|
88
|
-
**`replace-way`**: refer to a shared schema to replace before the validation
|
|
95
|
+
**`replace-way`**: refer to a shared schema to replace before the validation
|
|
96
|
+
process.
|
|
89
97
|
|
|
90
98
|
```js
|
|
91
99
|
const sharedAddressSchema = {
|
|
@@ -114,4 +122,5 @@ const schema = { body: bodyJsonSchema }
|
|
|
114
122
|
fastify.post('/the/url', { schema }, handler)
|
|
115
123
|
```
|
|
116
124
|
|
|
117
|
-
NB You can mix up the `$ref-way` and the `replace-way` when using
|
|
125
|
+
NB You can mix up the `$ref-way` and the `replace-way` when using
|
|
126
|
+
`fastify.addSchema`.
|