- 授权协议: MIT
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/fastify/fastify
- 软件文档: https://github.com/fastify/fastify/blob/master/README.md
- 官方下载: https://github.com/fastify/fastify/releases
软件介绍
Fastify 是一个高度专注于以最少开销和强大的插件架构为开发者提供最佳体验的 Web 框架。 它受到了 Hapi 和 Express 的启发。
安装
npm i fastify --save
示例代码
// Require the framework and instantiate it
const fastify = require('fastify')()
// Declare a route
fastify.get('/', function (request, reply) {
reply.send({ hello: 'world' })
})
// Run the server!
fastify.listen(3000, function (err) {
if (err) throw err
console.log(`server listening on ${fastify.server.address().port}`)
})核心特性:
100% 异步:框架的核心都是用异步代码实现的
高性能:每秒可以提供34000个请求
可扩展:Fastify 通过其钩子,插件和装饰器完全可扩展
基于模式:即使不是强制性的,我们建议使用 JSON Schema 来验证路由并序列化输出
日志记录:日志非常重要,但成本高昂;我们选择了最好的记录器 Pino
对开发者友好:该框架构建非常有表现力,不会牺牲性能和安全性
Data Structures and Algorithms in Java
Robert Lafore / Sams / 2002-11-06 / USD 64.99
Data Structures and Algorithms in Java, Second Edition is designed to be easy to read and understand although the topic itself is complicated. Algorithms are the procedures that software programs use......一起来看看 《Data Structures and Algorithms in Java》 这本书的介绍吧!
