内容简介:Fastify 是一个高度专注于以最少开销和强大的插件架构为开发者提供最佳体验的 Web 框架,号称是目前最快的 Node.js 应用框架之一。 它受 Hapi 和 Express 的启发。 示例代码 // Require the framework and ...
Fastify 是一个高度专注于以最少开销和强大的插件架构为开发者提供最佳体验的 Web 框架,号称是目前最快的 Node.js 应用框架之一。 它受 Hapi 和 Express 的启发。
示例代码
// Require the framework and instantiate itconst fastify = require('fastify')()// Declare a routefastify.get('/', function (request, reply) { reply.send({ hello: 'world' }) })// Run the server!fastify.listen(3000, '127.0.0.1', function (err) { if (err) throw err console.log(`server listening on ${fastify.server.address().port}`) })
Fastify v1.2.0 更新内容:
改进
Better error messages for json schema errors - #860
Add support for handler in shorthand route options. - #843
修复
Better handling of 404 routes - #862
Internals
文档
【声明】文章转载自:开源中国社区 [http://www.oschina.net]
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:- Laravel 5.7 正式发布,号称最优雅的 PHP Web 框架
- Fastify 1.14.0 发布,号称速度最快的 Node.js Web 框架
- Fastify 2.0.0 和 1.14.2 发布,号称速度最快的 Node.js Web 框架
- Fastify 2.0.0 和 1.14.2 发布,号称速度最快的 Node.js Web 框架
- DAG:一个号称可以取代区块链的技术
- 号称比 Chrome 快 400%,Avast 推出全新安全浏览器
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
ActionScript 3.0 Cookbook
Joey Lott、Darron Schall、Keith Peters / Adobe Dev Library / 2006-10-11 / GBP 28.50
Well before Ajax and Microsoft's Windows Presentation Foundation hit the scene, Macromedia offered the first method for building web pages with the responsiveness and functionality of desktop programs......一起来看看 《ActionScript 3.0 Cookbook》 这本书的介绍吧!