红联Linux门户
Linux帮助

Fastify 0.35.5发布,极速Node.js的Web框架

发布时间:2017-12-06 09:10:45来源:红联作者:baihuo
Fastify 是一个高度专注于以最少开销和强大的插件架构为开发者提供最佳体验的 Web 框架,号称是目前最快的 Node.js 应用框架之一。 它受 Hapi 和 Express 的启发。

Fastify 0.35.5 是一个小的修复版本,修复了解析 JSON 正文后吞并错误的问题。

示例代码[code]// 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}`)
})[/code]软件详情:http://git.oschina.net/mirrors/Fastify

下载地址:https://github.com/fastify/fastify/archive/v0.35.5.zip

来自:开源中国社区
文章评论

共有 0 条评论