红联Linux门户
Linux帮助

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

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

Fastify 0.35.3 是一个小的修复版本,修复了对不支持的方法的 404 处理。

示例代码[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.3.zip

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

共有 0 条评论