Socket
Socket
Sign inDemoInstall

fastify

Package Overview
Dependencies
61
Maintainers
2
Versions
282
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.13.0 to 0.13.1

5

docs/Plugins.md

@@ -23,2 +23,7 @@ <h1 align="center">Fastify</h1>

<a name="error-handling"></a>
#### Error handling
The error handling is done by [avvio](https://github.com/mcollina/avvio#error-handling).
As general rule is highly recommended that you handle your errors in the `register`'s callback, otherwise the server will not start, and you will find the unhandled error in the `listen` callback.
<a name="create-plugin"></a>

@@ -25,0 +30,0 @@ ### Create a plugin

3

fastify.js

@@ -150,3 +150,4 @@ 'use strict'

function listen (port, cb) {
fastify.ready(function () {
fastify.ready(function (err) {
if (err) return cb(err)
server.listen(port, cb)

@@ -153,0 +154,0 @@ })

{
"name": "fastify",
"version": "0.13.0",
"version": "0.13.1",
"description": "Fast and low overhead web framework, for Node.js",

@@ -62,3 +62,3 @@ "main": "fastify.js",

"ajv": "^4.11.5",
"avvio": "^0.5.0",
"avvio": "^0.6.1",
"body": "^5.1.0",

@@ -65,0 +65,0 @@ "fast-json-stringify": "^0.10.4",

@@ -22,2 +22,3 @@ <div align="center">

### Core features
- **100% asynchronous:** all the core is implemented with asynchronous code, in this way not even a millisecond is wasted.

@@ -24,0 +25,0 @@ - **Highly performant:** as far as we know, Fastify is one of the fastest web frameworks in town, depending on the code complexity we can serve up to 20000 request per second.

@@ -286,1 +286,15 @@ 'use strict'

})
test('if a plugin raises an error and there is not a callback to handle it, the server must not start', t => {
t.plan(2)
const fastify = Fastify()
fastify.register((instance, opts, next) => {
next(new Error('err'))
})
fastify.listen(0, err => {
t.ok(err instanceof Error)
t.is(err.message, 'err')
})
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc