Socket
Socket
Sign inDemoInstall

fastify

Package Overview
Dependencies
Maintainers
2
Versions
288
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify - npm Package Compare versions

Comparing version 0.13.1 to 0.14.0

docs/Server-Methods.md

7

docs/Getting-Started.md

@@ -26,9 +26,2 @@ <h1 align="center">Fastify</h1>

```
<a name="server-methods"></a>
#### Some useful methods
- `fastify.server`: The Node core server object
- `fastify.ready(callback)`: Function called when all the plugins has been loaded.
- `fastify.listen(callback)`: Starts the server on the given port after all the plugins are loaded, internally waits for the `.ready()` event. The callback is the same as the Node core.
- `fastify.route(options)`: check [here](https://github.com/fastify/fastify/blob/master/docs/Routes.md).
- `fastify.close(callback)`: call this function to close the server instance and run the [`'onClose'`](https://github.com/fastify/fastify/blob/master/docs/Hooks.md#on-close) hook.

@@ -35,0 +28,0 @@ <a name="schema"></a>

@@ -91,2 +91,5 @@ 'use strict'

// exposes the routes map
fastify[Symbol.iterator] = iterator
return fastify

@@ -260,2 +263,34 @@

function iterator () {
var entries = map.entries()
var it = {}
it.next = function () {
var next = entries.next()
if (next.done) {
return {
value: null,
done: true
}
}
var value = {}
var methods = {}
value[next.value[0]] = methods
// out methods are saved Uppercase,
// so we lowercase them for a better usability
for (var method in next.value[1]) {
methods[method.toLowerCase()] = next.value[1][method]
}
return {
value: value,
done: false
}
}
return it
}
// TODO: find a better solution than

@@ -262,0 +297,0 @@ // copy paste the code of the constructor

2

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

@@ -5,0 +5,0 @@ "main": "fastify.js",

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

* <a href="https://github.com/fastify/fastify/blob/master/docs/Getting-Started.md"><code><b>Getting Started</b></code></a>
* <a href="https://github.com/fastify/fastify/blob/master/docs/Server-Methods.md"><code><b>Server Methods</b></code></a>
* <a href="https://github.com/fastify/fastify/blob/master/docs/Routes.md"><code><b>Routes</b></code></a>

@@ -41,0 +42,0 @@ * <a href="https://github.com/fastify/fastify/blob/master/docs/Logging.md"><code><b>Logging</b></code></a>

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc