Hello, World!

Embedded below is essentially simplest Fiber app, which you can create.

  1. package main
  2.  
  3. import "github.com/gofiber/fiber"
  4.  
  5. func main() {
  6. app := fiber.New()
  7.  
  8. app.Get("/", func(c *fiber.Ctx) {
  9. c.Send("Hello, World!")
  10. })
  11.  
  12. app.Listen(3000)
  13. }
  1. go run server.go

Browse to http://localhost:3000 and you should see Hello, World! on the page.