[Go 开源推荐] fiber —— 受 Express.js 启发的 Go Web 框架

Go

https://github.com/gofiber/fiber

Fiber 是一个受 Express 启发的 web 框架,构建在 Go 最快的 HTTP 引擎 Fasthttp 上。旨在 快速 开发提供方便,同时考虑 零内存分配 和 性能

⚡️ 快速入门

package main

import "github.com/gofiber/fiber"

func main() {
  app := fiber.New()

  app.Get("/", func(c *fiber.Ctx) {
    c.Send("Hello, World!")
  })

  app.Listen(3000)
}

⚙️ 安装

首先, 下载 并安装 Go 1.11 或更高版本。

使用 go get 命令完成安装:

go get -u github.com/gofiber/fiber/...

🤖 基准测试

这些测试由 TechEmpower 和 Go Web 执行。如果要查看所有结果, 请访问我们的 Wiki.

 

🎯 特性

💡 理念

从 Node.js 切换到 Go 的开发者,可以从构建 Web 应用程序或微服务开始。 Fiber 作为一种 Web 框架,是按照 极简主义 的思想创建的,并遵循 UNIX 方式,以便新的 Go 开发者能够迅速进入 Go 的世界。

Fiber 受网上最流行的 Web 框架 Express 启发。我们将 Express 的 易用 与 Go 的 原生性能 结合在一起。如果您曾经在 Node.js 中开发过 Web 应用程序( 使用 Express 或相似的框架 ),那么许多方法和原理对您来说是 很容易的

我们 关注 我们用户的所有 问题 ( 以及全网 ) ,以创建 快速灵活 和 友好 的 Go Web 框架!就像 Express 在 JavaScript 的地位一样。

Fiber is inspired by Express, the most popular web framework on the Internet. We combined the ease of Express and raw performance of Go. If you have ever implemented a web application in Node.js (using Express or similar), then many methods and principles will seem very common to you.

We listen to our users in issues (and all over the Internet) to create a fastflexible and friendly Go web framework for any task, deadline and developer skill! Just like Express does in the JavaScript world.

本文中的所有译文仅用于学习和交流目的,转载请务必注明文章译者、出处、和本文链接
我们的翻译工作遵照 CC 协议,如果我们的工作有侵犯到您的权益,请及时联系我们。

原文地址:https://github.com/gofiber/fiber

译文地址:https://learnku.com/go/t/41670

本文为协同翻译文章,如您发现瑕疵请点击「改进」按钮提交优化建议
讨论数量: 1

非常棒的框架。github.com/gofiber/fiber

2年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!