Skip to content

Commit 9135e8e

Browse files
authoredJan 13, 2021
Grammar and spelling corrections in documentation (fastify#2793)
* docs: grammatical corrections and sentence structuring * docs(write-plugin): replace travis ci recommendation See https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing, Travis has moved to a trial period and is not fully free anymore * docs(write-plugin): replace greenkeeper recommendation Greenkeeper is no longer active, see message on homepage of https://greenkeeper.io/
1 parent 926b6bc commit 9135e8e

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed
 

‎SECURITY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Security Policy
22

3-
This document describes the management of vulnerabilities for the Fastify project and it's officials' plugins.
3+
This document describes the management of vulnerabilities for the Fastify project and its official plugins.
44

55

66
## Reporting vulnerabilities

‎docs/Middleware.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
## Middleware
44

5-
From Fastify v3, middleware support does not come out of the box with the framework itself, but it's offered as an external plugin via [`fastify-express`](https://github.com/fastify/fastify-express) and [`middie`](https://github.com/fastify/middie).
5+
Starting with Fastify v3.0.0, middleware is not supported out of the box and requires an external plugin such as [`fastify-express`](https://github.com/fastify/fastify-express) or [`middie`](https://github.com/fastify/middie).
66

7-
If you need to use an express style middleware you can use one of the two plugins above:
7+
8+
An example of registering the [`fastify-express`](https://github.com/fastify/fastify-express) plugin to then `use` Express middleware:
89

910
```js
1011
await fastify.register(require('fastify-express'))
@@ -16,7 +17,7 @@ fastify.use(require('ienoopen')())
1617
fastify.use(require('x-xss-protection')())
1718
```
1819

19-
You can also use [`middie`](https://github.com/fastify/middie), which provides support for simple Express-style middlewares but with improved performances:
20+
You can also use [`middie`](https://github.com/fastify/middie), which provides support for simple Express-style middleware but with improved performance:
2021

2122
```js
2223
await fastify.register(require('middie'))
@@ -49,4 +50,4 @@ fastify.use(['/css', '/js'], serveStatic(path.join(__dirname, '/assets')))
4950

5051
### Alternatives
5152

52-
Fastify offers some alternatives to the most commonly used middlewares, such as [`fastify-helmet`](https://github.com/fastify/fastify-helmet) in case of [`helmet`](https://github.com/helmetjs/helmet), [`fastify-cors`](https://github.com/fastify/fastify-cors) for [`cors`](https://github.com/expressjs/cors) and [`fastify-static`](https://github.com/fastify/fastify-static) for [`serve-static`](https://github.com/expressjs/serve-static).
53+
Fastify offers some alternatives to the most commonly used middleware, such as [`fastify-helmet`](https://github.com/fastify/fastify-helmet) in case of [`helmet`](https://github.com/helmetjs/helmet), [`fastify-cors`](https://github.com/fastify/fastify-cors) for [`cors`](https://github.com/expressjs/cors) and [`fastify-static`](https://github.com/fastify/fastify-static) for [`serve-static`](https://github.com/expressjs/serve-static).

‎docs/Server.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ function defaultClientErrorHandler (err, socket) {
464464
}
465465
```
466466
467-
*Note: `clientErrorHandler` operates with raw socket. The handler is expected to return a properly formed HTTP response that includes a status line, HTTP headers and a message body. Before attempting to write the socket, the handler should check if the socket it's still writable as it may already have been destroyed.*
467+
*Note: `clientErrorHandler` operates with raw socket. The handler is expected to return a properly formed HTTP response that includes a status line, HTTP headers and a message body. Before attempting to write the socket, the handler should check if the socket is still writable as it may have already been destroyed.*
468468
469469
```js
470470
const fastify = require('fastify')({

‎docs/Write-Plugin.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The core principles of Fastify are performance, low overhead and providing a goo
99
## Code
1010
Fastify uses different techniques to optimize its code, many of them are documented in our Guides. We highly recommend you read [the hitchhiker's guide to plugins](Plugins-Guide.md) to discover all the APIs you can use to build your plugin and learn how use them.
1111

12-
Have you got some question or are you seeking for a suggestion? We are more than happy to help you! Just open an issue in our [help repository](https://github.com/fastify/help).
12+
Do you have a question or need some advice? We are more than happy to help you! Just open an issue in our [help repository](https://github.com/fastify/help).
1313

1414
Once you submit a plugin to our [ecosystem list](Ecosystem.md), we will review your code and help you improve it if necessary.
1515

@@ -41,8 +41,8 @@ It is not mandatory, but we highly recommend you use a code linter in your plugi
4141
We use [`standard`](https://standardjs.com/) since it works without the need to configure it and is very easy integrate in a test suite.
4242

4343
## Continuous Integration
44-
It is not mandatory, but if you release your code as open source it helps to use Continuous Integration to ensure contributions do not break your plugin and to show that the plugin works as intended. [Travis](https://travis-ci.org/) is free for open source projects and easy to setup.<br>
45-
In addition you can enable services like [Greenkeeper](https://greenkeeper.io/), that will help you keep your dependencies up to date and discover if a new release of Fastify has some issues with your plugin.
44+
It is not mandatory, but if you release your code as open source it helps to use Continuous Integration to ensure contributions do not break your plugin and to show that the plugin works as intended. Both [CircleCI](https://circleci.com/) and [GitHub Actions](https://github.com/features/actions) are free for open source projects and easy to setup.<br>
45+
In addition you can enable services like [Dependabot](https://dependabot.com/) or [Snyk](https://snyk.io/), that will help you keep your dependencies up to date and discover if a new release of Fastify has some issues with your plugin.
4646

4747
## Let's start!
4848
Awesome, now you know everything you need to know about how to write a good plugin for Fastify!

0 commit comments

Comments
 (0)